Mac に Oracle Database を導入する軌跡
※さくっと終わらせようとしてまだ完了してませんorz以下編集中。
DB本体のインストール
以下のページからDatabase本体のソースコードをダウンロード。
http://www.oracle.com/technology/global/jp/software/products/oracle10g/10103macos/10103macos_trial_dl.html
記載されている手順に従って解凍すると、Disk1 というディレクトリが出来ました。
$ cd ~/Downloads $ gunzip ship_mac_db.cpio.gz $ cpio -idmv < ship_mac_db.cpio ... $ ls Disk1/ doc install runInstaller welcome.htm fonts response stage
インストール方法は以下のヘルプを参照。システム要件からユーザの作成方法まで読みづらいけど丁寧に書かれています。
http://download.oracle.com/docs/html/B13954_01/toc.htm
Table of Contents
- Pre-Install Tasks
- Installation Tasks
- インストール概要
- DB本体の入手
- CD、DVDからDBインストーラをコピーする場合
- インストールの実行
sh-3.2# /usr/sbin/system_profiler SPHardwareDataType | grep Memory Memory: 2 GB sh-3.2# df -h /tmp Filesystem Size Used Avail Capacity Mounted on /dev/disk0s2 56Gi 38Gi 17Gi 69% / sh-3.2# sw_vers ProductName: Mac OS X ProductVersion: 10.5.6 BuildVersion: 9G55 sh-3.2# gcc -v Using built-in specs. Target: i686-apple-darwin9 Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9 Thread model: posix gcc version 4.0.1 (Apple Inc. build 5465)
sh-3.2# dscl . create /Groups/oinstall gid 600 sh-3.2# dscl . create /Groups/dba gid 601 sh-3.2# dscl . create /Users/oracle gid 600 sh-3.2# dscl . create /Users/oracle shell /bin/bash
クライアント
$ sudo port install oracle-instantclient Password: ---> Fetching oracle-instantclient Warning: MacPorts may not be able to download the necessary distfiles for oracle-instantclient. If you get a checksum error, please download instantclient-basic-macosx-10.2.0.4.0.zip and instantclient-sdk-macosx-10.2.0.4.0.zip manually from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html and place them in /opt/local/var/macports/distfiles/oracle-instantclient ---> Attempting to fetch instantclient-basic-macosx-10.2.0.4.0.zip from http://download.oracle.com/otn/mac/instantclient/10204/ ---> Attempting to fetch instantclient-sdk-macosx-10.2.0.4.0.zip from http://download.oracle.com/otn/mac/instantclient/10204/ ---> Verifying checksum(s) for oracle-instantclient Error: Checksum (md5) mismatch for instantclient-basic-macosx-10.2.0.4.0.zip Error: Checksum (sha1) mismatch for instantclient-basic-macosx-10.2.0.4.0.zip Error: Checksum (rmd160) mismatch for instantclient-basic-macosx-10.2.0.4.0.zip Error: Checksum (md5) mismatch for instantclient-sdk-macosx-10.2.0.4.0.zip Error: Checksum (sha1) mismatch for instantclient-sdk-macosx-10.2.0.4.0.zip Error: Checksum (rmd160) mismatch for instantclient-sdk-macosx-10.2.0.4.0.zip Error: Target org.macports.checksum returned: Unable to verify file checksums Error: Status 1 encountered during processing.
おこられた…
どうやら以下のソースファイルは自分でダウンロードしないといけないらしい。
先ずは以下にアクセス。
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html
$ ls -l /opt/local/var/macports/distfiles/oracle-instantclient/ total 32 -rw-r--r-- 1 root admin 4132 1 20 21:49 instantclient-basic-macosx-10.2.0.4.0.zip -rw-r--r-- 1 root admin 4126 1 20 21:49 instantclient-sdk-macosx-10.2.0.4.0.zip $ mv ~/Downloads/instantclient-* /opt/local/var/macports/distfiles/oracle-instantclient/ $ ls -l /opt/local/var/macports/distfiles/oracle-instantclient/ total 67632 -rw-r--r--@ 1 macu macg 34020719 4 23 2008 instantclient-basic-macosx-10.2.0.4.0.zip -rw-r--r--@ 1 macu macg 603493 4 23 2008 instantclient-sdk-macosx-10.2.0.4.0.zip
準備完了。再度実行してみる。
$ sudo port install oracle-instantclient---> Verifying checksum(s) for oracle-instantclient ---> Extracting oracle-instantclient ---> Configuring oracle-instantclient ---> Building oracle-instantclient with target all ---> Staging oracle-instantclient into destroot ---> Installing oracle-instantclient 10.2.0.4.0_1 ---> Activating oracle-instantclient 10.2.0.4.0_1 ---> Cleaning oracle-instantclient