Nethence Newdoc Olddoc Lab Your IP BBDock  


Warning: those guides are mostly obsolete, please have a look at the new documentation.

UnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigs

Installing Oracle 9iR2 on rhel4
 
 
Introduction
Oracle 9i was supposed to run on rhel3 but 9.2's release notes and a few packages from oss.oracle.com makes it possible for you to run it on rhel4.
 
 
Hardware / system requirements
- a minimal RHEL4 installation (just @base) is alright, we will add the required packages later on
- at least 512MB of RAM
- swap space equal to RAM or at least 1GB (whichever is greater)
- at least 4.5GB available for binaries and a database
- /oracle/ as a quite large mount point
note. don't use "mkfs.ext3 -T largefile" as one MB per inode takes too much space away
- a static IP address (BOOTPROTO=static) which resolves locally (fix /etc/hosts)
 
Note. you'll probably want to enable ntp or at least sync the time once.
 
 
Oracle installation media
Note. while preparing the system, you'll probably want to download those :
- x32 -- B13496-01.zip (Oracle E-Delivery)
- x32 -- B13497-01.zip (Oracle E-Delivery)
- x32 -- B13497-01.zip (Oracle E-Delivery)
- x32 -- compat-libstdc++-3.2-1.i386.rpm (oss.oracle.com)
(-) x64 -- compat-libcwait-2.1-2.x86_64.rpm (oss.oracle.com
- x32 -- compat-oracle-rhel4-1.0-5.i386.rpm (oss.oracle.com)
Note. you can also get the two RPMs as patches from Oracle support / metalink
(p4198954_40_LINUX.zip for x32)
 
 
Package requirements
Make sure you've got those installed,
rpm -q \
compat-db \
compat-gcc-32 \
compat-gcc-32-c++ \
compat-oracle-rhel4 \
compat-libcwait \
compat-libgcc-296 \
compat-libstdc++-296 \
compat-libstdc++-33 \
gcc \
gcc-c++ \
gnome-libs \
gnome-libs-devel \
libaio-devel \
libaio \
make \
openmotif21 \
xorg-x11-deprecated-libs-devel \
xorg-x11-deprecated-libs \
| grep ^package
Ref. Oracle9i Release Notes Release 2 (9.2.0.4.0) for Linux x86
Note. we're also assuming,
rpm -q setarch unzip util-linux
Note. openmotif21 has xorg-x11-deprecated-libs as dependency
Note. you'll get compat-oracle-rhel4 and compat-libcwait from there,
wget http://oss.oracle.com/projects/compat-oracle/dist/files/RedHat/compat-libcwait-2.1-1.i386.rpm
#wget http://oss.oracle.com/projects/compat-oracle/dist/files/RedHat/compat-libcwait-2.1-2.x86_64.rpm
wget http://oss.oracle.com/projects/compat-oracle/dist/files/RedHat/compat-oracle-rhel4-1.0-5.i386.rpm
touch /etc/ld.so.preload
rpm -ivh *.rpm
 
 
Kernel parameters
Clean-up the existing configuration,
cd /etc/
mv sysctl.conf sysctl.conf.dist
sed '/^$/d; /^#/d;' sysctl.conf.dist > sysctl.conf
 
According to what the 9.2.0.1 x86 installation guide and the 9.2.0.4 release notes tells us, there's lots of parameters to tune. But in fact, most of the system's default values are above oracle's recommended values, so there's very few of them to change, in the end.
 
Look for recommended values in the officiel doc.
http://download.oracle.com/docs/html/A96167_01/pre.htm#CHDHDABJ
http://download.oracle.com/docs/html/B13670_07/toc.htm#CEGGGHBA
 
Check the current values are equal or above the recommended values,
sysctl kernel.sem \
kernel.shmmax \
kernel.shmmni \
fs.file-max \
net.ipv4.ip_local_port_range
Note. kernel.sem = semmsl semmns semopm semmni
 
On a default rhel4 and for a single database instance, only semopm (32 => 100), eventually shmmax, fs.file-max (49972 => 65536) and eventually the port range (32768 61000 => 1024 65000) need to be fixed,
cd /etc/
mem=`free|grep ^Mem|awk '{print $2}'`
shmmax=$(($mem/2))
cat >> sysctl.conf <<EOF9
#oracle tuning
kernel.sem = 250 32000 100 128
kernel.shmmax = $shmmax
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
EOF9
unset mem shmmax
Note. other semaphores than semopm can be copied from the current values
Note. file handles (ulimit -n) will be defined later
Note. process limit (ulimit -u) will be defined later
 
Note. for database SGA's greater than 1.8gb, consider mounting /dev/shm with option nr_blocks=8g,
cat >> /etc/fstab <<EOF9
shm /dev/shm shmfs nr_blocks=8g 0 0
EOF9
 
 
File descriptors and processes
The fs.file-max kernel parameter has been changed but the user need to be permitted to use it. And we also set the max number of processes.
cd /etc/security/
cat >> limits.conf <<EOF9
oracle soft nofile 4096
oracle hard nofile 63536
oracle soft nproc 2047
oracle hard nproc 16384
EOF9
and actually use it... (also see below for use of ulimit)
cat >> /etc/pam.d/login <<EOF9
session required pam_limits.so
session required pam_unix.so
EOF9
 
 
Groups and users
Create the groups,
groupadd oinstall
groupadd dba
 
Create the "oracle" user and check perms (should be 700),
useradd -g oinstall -G dba oracle
passwd oracle
cd /home
ll
 
Note. the "nobody" user should exist,
grep ^nobody /etc/passwd
 
 
Oracle user environment
Enable the use of .bashrc which is already read (even non-login screen windows...),
su - oracle
cd ~/
cat > .bash_profile <<EOF9
. /etc/profile
. /etc/bashrc
. \$HOME/.bashrc
EOF9
 
Use the limits we enabled before (-n for file descriptors, -u for number of processes) and prepare for installation,
cat > ~oracle/.bashrc <<EOF9
umask 022
ulimit -n 63536
ulimit -u 16384
 
ORACLE_BASE=/oracle
TMP=\$ORACLE_BASE/tmp
TMPDIR=\$TMP
NLS_LANGUAGE=american
NLS_TERRITORY=america
NLS_LANG=american_america.utf8
LANG=en_US
export ORACLE_BASE TMP TMPDIR NLS_LANGUAGE NLS_TERRITORY NLS_LANG LANG
 
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$HOME/bin:$PATH\
:$ORACLE_HOME/Apache/Apache/bin
#:$ORACLE_HOME\opmn\bin
ORACLE_HOME_NAME=ora92
ORACLE_HOME=$ORACLE_BASE/9.2/ora92
export PATH ORACLE_HOME_NAME ORACLE_HOME
 
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
 
PS1='$LOGNAME> '
alias ll='ls -alkF'
#alias sql='sqlplus / as sysdba'
EOF9
Note. the default file permission mask is already 022 by default, but we force it
Note. LD_ASSUME_KERNEL=2.4.19 otherwise you would get this error when launching dbca later on,
/oracle/jre/1.1.8/bin/../lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
 
This doesn't harm (no feaking colors in the editor),
cat > .vimrc <<EOF9
syn off
EOF9
exit
 
Login as oracle and check,
ulimit -n
ulimit -u
echo $ORACLE_BASE
 
 
Oracle installation
As oracle user, extract the archives,
cd ~/
mkdir disk1/
mkdir disk2/
mkdir disk3/
unzip -d disk1/ B13496-01.zip
unzip -d disk2/ B13497-01.zip
unzip -d disk3/ B13498-01.zip
rm -f B13496-01.zip
rm -f B13497-01.zip
rm -f B13498-01.zip
Note. don't extract the three archives in the same directory, the oracle installer freaks out...
 
As oracle user (connect directly and with X11 forwarding enabled),
cd ~/
echo $ORACLE_BASE
cd disk1/
./runInstaller
and proceed,
inventory location: /oracle/9.2_oraInventory
unix group name: oinstall
(execute /tmp/orainstRoot.sh as root)
name: ora92
path: /oracle/9.2/ora92
software only
(execute /oracle/9.2/ora92/root.sh as root)
 
 
References
Oracle9i Database Release 2 (9.2) Documentation
http://www.oracle.com/technetwork/documentation/oracle9i-090271.html
 
Oracle9i Release Notes Release 2 (9.2.0.1.0) for Linux Intel (32-bit)
http://download.oracle.com/docs/html/A97349_05/toc.htm
 
Oracle9i Release Notes Release 2 (9.2.0.4.0) for Linux x86
http://download.oracle.com/docs/html/B13670_07/toc.htm
 
Oracle9i Release Notes Release 2 (9.2.0.4) for Linux x86-64
http://download.oracle.com/docs/html/B13848_02/toc.htm
 
Oracle9i Installation Guide Release 2 for UNIX Systems: AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel, and Sun Solaris
http://download.oracle.com/docs/html/A96167_01/toc.htm
 
Project Downloads: Compatibility
http://oss.oracle.com/projects/compat-oracle/files/RedHat/
 

(obsolete, see the new doc)