lundi 7 février 2011

Oracle 10R2 on Mac OS X

I wanted to install Oracle 10.2 on Mac OS X 10.6.6 64Bit and found a couple of issues that you might encounter as well. I could not get it to link the Oracle binaries, so this is all a bit moot, for the moment. Will post as soon as I have found a solution for that - I use db2 instead, also a post on installing db2 on darwin in the works.

First of all, create the users and groups as described in the installation instructions:
1. find free id's for groups:
dscl . -list /groups gid | awk '{print $2}' | sort -n
2. find free id's for oracle user:
dscl . -list /users uid | awk '{print $2}' | sort -n
I used uid/gid's 300, 301, 301 for oracle and oinstall, dba, oper, respectively

3. create the groups

dscl . -create /groups/oinstall
dscl . -append /groups/oinstall gid 300
dscl . -append /groups/oinstall passwd "*"


dscl . -create /groups/dba
dscl . -append /groups/dba gid 301
dscl . -append /groups/dba passwd "*"
dscl . -append /groups/dba GroupMembership hans

dscl . -create /groups/oper
dscl . -append /groups/oper gid 302
dscl . -append /groups/oper passwd "*"
dscl . -append /groups/oper GroupMembership hans

4. create the oracle user

You could also use system preferences to create the user, in which case you only have to execute the last three of the dscl commands.
dscl . -create /users/oracle
dscl . -append /users/oracle uid 300
dscl . -append /users/oracle shell /bin/bash
dscl . -append /users/oracle home /Users/oracle
dscl . -append /users/oracle realname "Oracle software owner"

dscl . -append /users/oracle gid 302
dscl . -append /groups/dba GroupMembership oracle
dscl . -append /groups/dba GroupMembership hans

mkdir /Volumes/oracle
chown oracle:oinstall /Volumes/oracle
passwd oracle
5. Next, specify the kernel parameters:

I created a file named /etc/sysctl.conf with the following contents:

kern.sysv.semmsl=87381
kern.sysv.semmns=87381
kern.sysv.semmni=87381
kern.sysv.semmnu=87381
kern.sysv.semume=10
kernel.shmall=2097152
kernel.sys.shmmax=2147483648
kernel.sys.shmmni=4096
kern.maxfiles=65536
kern.maxfilesperproc=65536
net.inet.ip.portrange.first=1024
net.inet.ip.portrange.last=65000
kern.corefile=core
kern.maxproc=2068
kern.maxprocperuid=2068
6. Reboot, log on as oracle
In terminal, you want to start the 32bit Java VM:
Run:
java -version
If java -version shows it is running a 64Bit JVM, you need the 32Bit one:
./runInstaller -J-d32

I got the following error when trying to start runInstaller with the 64Bit JVM:

Install2011-02-08_07-12-16AM/oui/lib/mac_osx/liboraInstaller.dylib: no suitable image found. Did find: /private/tmp/OraInstall2011-02-08_07-12-16AM/oui/lib/mac_osx/liboraInstaller.dylib: mach-o, but wrong architecture