Oracle 10g installation on SUSE Linux Enterprise Server 9 (using scripts)

This scripts simplify installation with 'orarun' package, fixing few minor problems and automating all necessary steps. Next release of 'orarun' can eliminate any need in these scripts.

This scripts implement all operations, described in original document from SUSE Linux

I describe installation of 64bit Oracle, but all below (including scripts) can work for 32 bit Linux and Oracle without changes (except platform name, of cource).

Preparation.

You will need for installation (for 64bit installation):

Make Oracle available on network or local disks (do not use smb file system, use NFS) or be ready to copy it from installation CD. Obey licenses (Oracle can be downloaded for evaluation purposes, so be careful do not violate their licensing). Make this scripts available (for writing).

Installation steps

File CONFIG.sh:
#
# This is configuration file for install
#
RPMs=`/bin/pwd`/../RPMs
ORACLE10=`/bin/pwd`/../../Oracle10-amd64/DB
ORA10CD1=$ORACLE10/Disk1
RPMORARUN=$RPMs/orarun-1.8-109.5.i586.rpm
ORAID=10.1.0
#
ORA10CD1=$ORACLE10/Disk1
RPMORARUN=$RPMs/orarun-1.8-109.5.i586.rpm
SID=test
File 010-install-orarun.sh:
#!/bin/bash
#	Install orarun package
#
. CONFIG.sh
rpm -U $RPMORARUN

passwd oracle
chsh -s /bin/bash oracle

File 015-edit-oraprofile.sh:
#!/bin/bash
#
#	Edit /etc/sysconfig/oracle.sh and oracle.sh
#
. CONFIG.sh
cd /etc/profile.d
for i in oracle.sh oracle.sh
do
test -f $i-orig || cp $i $i-orig
sed "s/9ir2/$ORAID/g;s+2.2.5+2.4.21+g;s/mydb/$SID/g;" $i > $i- && cp $i- $i && rm $i-
chown oracle $i
ls -l $i
done
File 020-start-rcoracle.sh:
#!/bin/bash
#
#	Run rcoracle to set up kernel parameters
#
. CONFIG.sh
rcoracle start
File 030-check-oracle-user.sh:
#!/bin/bash
#	Check oracle user setting
#
. CONFIG.sh
if [ ! -x $ORA10CD1/runInstaller ]
then
	echo -e "\33[31m *** Wrong oracle disk location - no file $ORA10CD1/runInstaller  found \33[30m"
	exit 1
fi
echo "*** CHECK ORACLE VARIABLES *** "
sux - -c "env" oracle | grep ORACLE
File 040-run-installer.sh:
#!/bin/bash
#	Run oracle installer as ORACLE user
#
. CONFIG.sh
sux - -c "cd $ORA10CD1 && ./runInstaller" oracle
echo -e "\33[33m *** Now , install oracle. Use defaults. ***\33[30m"
echo -e "\33[33m *** Create database instance $SID       ***\33[30m"
echo -e "\33[33m !!! Run 042-run-rootsh.sh when requested to run orainstRoot.sh. !!! \33[30m"
File 042-run-rootsh.sh:
#!/bin/bash
#
#	Running orainstallRoot.sh for Oracle Inventory
#
. CONFIG.sh
sh ~oracle/oraInventory/orainstRoot.sh

File 044-rootagain.sh:
#!/bin/bash
#
#	Running orainstallRoot.sh for Oracle Inventory
#
. CONFIG.sh
sh ~oracle/product/$ORAID/root.sh

File 050-edit-sysconfig.sh:
#!/bin/sh
#
#	Edit /etc/sysconfig/oracle AND /etc/init.d/oracle after all
#
. CONFIG.sh
cd /etc/sysconfig
mkdir -p ORIG
test -f ORIG/oracle || cp oracle ORIG/oracle
sed '/START_ORACLE_DB=/s/no/yes/;/START_ORACLE_DB_LISTENER/s/no/yes/;/START_ORACLE_DB_CMANAGER/s/no/yes/;s/START_ORACLE_DB_CMANAGER/START_ORACLE_DB_EMANAGER/g' oracle > oracle- && mv oracle- oracle

cd /etc/init.d
mkdir -p ORIG
test -f ORIG/oracle && cp oracle ORIG/oracle
sed 's+2.2.5+2.4.21+g;s/Connection Manager/Enterprise Manager/g;s/CManager/EManager/g;s/ORACLE_DB_CMANAGER/ORACLE_DB_EMANAGER/g;s/cmctl start/emctl start dbconsole/g;s/cmctl stop/emctl stop dbconsole/g;s/cmctl status/emctl status dbconsole/g;s/cmctl/emctl/g;' oracle > oracle-  && cp oracle- oracle && rm oracle-

cd /etc
sed "/$SID/s/N/Y/" oratab > oratab- && cp oratab- oratab && rm -f oratab-


File 060-start-oracle.sh:
#!/bin/sh
. CONFIG.sh
rcoracle start