First check (and possibly modify) some system parameters. First:
grep MemTotal /proc/meminfo
Anything > 500,000 kB is good. If you have less such as 256,000 kb on hancock, it might still be able to work. Next:
grep SwapTotal /proc/meminfo
Anything more than 1,000,000 kB is good. If you have less, make your swap partition bigger. Next:
df -k .
Anything > 400,000 kB available is good. Next:
df -k /
Anything > 4,000,000 kB available is good. If you have less, delete some files, grow your root partition, buy a new hard drive, or install to a different partition (which means deviating from this guide.) Next:
wajig install gcc make binutils libmotif3 lesstif2 rpm
Now, we need to create a dedicated user and two groups to install. For exmple, use oracle, oinstall, and dba for the user and the two groups respectively (deviating from these is not recommended.) Check whether they already exist or not:
grep oinstall /etc/group
grep dba /etc/group
grep nobody /etc/group
id oracle
id nobody
If any of them don't exist, create them:
/usr/sbin/groupadd oinstall /usr/sbin/groupadd dba /usr/sbin/groupadd nobody /usr/sbin/useradd -g oinstall -G dba -m -s /bin/bash oracle /usr/bin/passwd.cfsaved oracle # set password to oracle /usr/sbin/useradd -g nobody nobody or usermod -g nobody nobody # if nobody belongs to other group
Next, we need to create some directories and set permissions.
mkdir -p /u01/app/oracle
mkdir -p /u02/oradata
chown -R oracle:oinstall /u01 /u02
chmod -R 775 /u01 /u02
Next, we need to check some kernel parameters. Run the following commands, check the output, and make the changes as required.
/sbin/sysctl -a | grep sem
/sbin/sysctl -a | grep shm
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep ip_local_port_range
Output:
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 2147483648
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
If you need to change any of the values, open up /etc/sysctl.conf in your favourite text editor (emacs) and change the appropriate entries as follows:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
Run /sbin/sysctl -p to apply the changes (only if you changed something of course.)
Add the following lines to /etc/security/limits.conf file:
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
Add the following line to the /etc/pam.d/login file, if it does not already exist:
session required /lib/security/pam_limits.so
Because we are using the Bash shell add the following lines to the /etc/profile file:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Create the following symlinks:
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/rpm /bin/rpm #you might need to install rpm package first
ln -s /usr/bin/basename /bin/basename # Suggested by Giuseppe Sacco
Pretend that we are running RedHat (the installer won't run otherwise):
cat > /etc/redhat-release
Red Hat Linux release 2.1 (drupal)
^D
Log in as user oracle, if you want to use emacs to edit,
su oracle
cd # go to home directory
Add the following line to the end of .bash_profile
umask 022
Set/unset some environment variables:
ORACLE_BASE=/u01/app/oracle
ORACLE_SID=test
export ORACLE_BASE ORACLE_SID
unset ORACLE_HOME
unset TNS_ADMIN