Installing Oracle 9i 9.2.0.4 on Gentoo Linux
- Create /etc/env.d/80oracle and add the following:
# Oracle Environment
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/9.2.0
ORACLE_OWNER=oracle
ORACLE_SID=ORCL
ORACLE_TERM=xterm
NLS_LANG=AMERICAN
ORA_NLS33=/opt/oracle/product/9.2.0/ocommon/nls/admin/data
LDPATH=/opt/oracle/product/9.2.0/lib
PATH=/opt/oracle/product/9.2.0/bin
- Run the following commands:
groupadd dba # the group used for oracle
useradd -g dba -m oracle # the oracle user
env-update # update the enviornment by adding the 80oracle to it
echo `expr 1024 \* 1024 \* 1024` > /proc/sys/kernel/shmmax # increase shmmax
su - oracle # switch to the oracle user
export DISPLAY="desktop:0.0" # on your desktop make sure to run xhost server
./runInstaller # from Disk1 of Oracle 9i
- Install oracle as instructed and enter dba when asked for the unix group.
- If the Database Configuration Assistant fails do the following and retry:
touch /etc/rac_on
- If the Agent Configuration Assistant fails do the following:
- Download p3119415_9204_LINUX.zip and p2617419_210_GENERIC.zip from http://metalink.oracle.com
- Unpack both in /tmp then run the following:
export PATH=$PATH:/tmp/OPatch:/sbin
cd /tmp/3119415
opatch apply -no_inventory # I had to use -no_inventory but you might not need it
- Creat a startup/shutdown script /etc/init.d/oracle that has the following:
#!/sbin/runscript
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/9.2.0
ORACLE_OWNER=oracle
ORACLE_SID=ORCL
ORACLE_TERM=xterm
NLS_LANG=AMERICAN
ORA_NLS33=/opt/oracle/product/9.2.0/ocommon/nls/admin/data
LD_LIBRARY_PATH=/opt/oracle/product/9.2.0/lib
depend() {
use net
}
start() {
ebegin "Starting oracle"
su $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start" > /dev/null
su $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart > /dev/null
eend $?
}
stop() {
ebegin "Stopping oracle"
su $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop" > /dev/null
su $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut > /dev/null
eend $?
}
restart() {
svc_stop; svc_start
}
- Enjoy.