Oracle software installation.
Prerequisites
It's important to make sure you've got all the necessary software installed on your server before beginning the installation of Oracle. They've done a better job with 11g of testing for the existence of prerequisite software, so you get some better error messages when you are lacking a particular package. Here are the prerequisites that you don't have with a default RHEL install:- compat-libstdc++-33
- elfutils-libelf-devel
- gcc
- gcc-c++
- glibc-devel
- libaio-devel
- libstdc++-devel
- sysstat
- unixODBC
- unixODBC-devel
yum install compat-libstdc++-33 elfutils-libelf-devel gcc gcc-c++ glibc-devel libaio-devel libstdc++-devel sysstat unixODBC unixODBC-devel
Now, another thing that has gotten better with 11g is the documentation about prerequisites for 64-bit systems. It turns out that you've got to have both the 64-bit and 32-bit versions of some packages in order for things to go smoothly. The 64-bit prereqs that aren't installed as a part of a standard RHEL install are:
- compat-libstdc++-33
- compat-libstdc++-33 (32 bit)
- elfutils-libelf-devel
- gcc
- gcc-c++
- glibc-devel
- glibc-devel (32 bit)
- libaio-devel
- libstdc++-devel
- sysstat
yum install compat-libstdc++-33 compat-libstdc++-33*.i386 elfutils-libelf-devel gcc gcc-c++ glibc-devel glibc-devel*.i386 libaio-devel libstdc++-devel sysstat
Set up the OS for Oracle
These, again, seem like things that could be done easily by the installer. I know: you don't want to assume folks are installing as root. But why not, instead, require that the installation be done as root and allow the installer to choose these things from the UI? Again, I'm not saying these things are hard, but if you're wanting to increase your install base... Here the instructions for Oracle are quite good, BTW. Create the user account and install directory:
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
mkdir -p /oracle
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle
>passwd oracle
Oracle uses /u01/app/oracle for their default installation location. Seems to me that /oracle makes more sense.
In any case, pick what works for you, and use that in the commands above.
Set kernel parameters and user limits
Again, the Oracle docs are quite helpful on this front:
cat >> /etc/sysctl.conf
<<EOF
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
EOF
/sbin/sysctl -p cat >> /etc/security/limits.conf <<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login
<<EOF
session required /lib/security/pam_limits.so
EOF
Oracle has you set some OS limits on the Oracle user by editing the main system profile file. Their script generates a "unary operator expected" error (at least under some circumstances), so it seems a lot more direct to add that limit to the Oracle user's .bash_profile (assuming you're using bourne).
So add the following to /home/oracle/.bash_profile
<<EOF
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
EOF
/sbin/sysctl -p cat >> /etc/security/limits.conf <<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login
<<EOF
session required /lib/security/pam_limits.so
EOF
ulimit -u 16384 -n 65536
umask 022
I find it frustrating not to have tools like SQLPLUS and TNSPING in the path, and I want the Oracle environment variables set automatically, so add the following (modified to match your environment, of course) to .bash_profile, as well. If this is a system that hosts a lot of databases, it might not make sense to set the ORACLE_SID variable; that's up to you. Oracle's recommended method for taking care of this is to use the oraenv script, which is at /oracle/product/11.1.0/db_1/bin/
umask 022
export ORACLE_BASE=/oracle
export ORACLE_SID=<db_sid>
export ORACLE_HOME=/oracle/product/11.1.0/db_1
export PATH=$PATH:/oracle/product/11.1.0/db_1/bin/
Click here to see the code to use for korn shell and c-shell.
export ORACLE_SID=<db_sid>
export ORACLE_HOME=/oracle/product/11.1.0/db_1
export PATH=$PATH:/oracle/product/11.1.0/db_1/bin/
If you're using korn (ksh), add the following to /home/oracle/.profile
That should get things ready for the Oracle installation. In Part 2, we'll get Oracle installed.
ulimit -p 16384
ulimit -n 65536
umask 022
And, finally, if you're using c-shell, add the following to /home/oracle/.login
limit maxproc 16384
limit descriptors 65536
umask 022
limit descriptors 65536
umask 022
Mark Hurd workforce management encompasses time and labor, absence management and is fully integrated with payroll and other core HR functions and financials, to bring accuracy, simplicity, and insight to a once-onerous task. The result is an engaged and connected workforce eager to contribute to organizational success…..
ReplyDelete