14 September 2010

Linux kernel parameters for Oracle installation

1) Edit file /etc/sysctl.config
example RAM8Gb
kernel.shmmax = 2147483648 #max RAM
kernel.shmall = 2097152
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=1048576
net.core.rmem_max=1048576
net.core.wmem_default=262144
net.core.wmem_max=262144








What do those parameters and values actually mean?
  • fs.file-max sets the maximum number of open files that can be handled by the Linux kernel.
  • kernel.shmall determines the total amount of shared memory to be allocated in pages. In this example, I’ve set it to 8GB, which is way above the amount of memory I can handle in my box, even with swap.
  • kernel.shmmax controls the maximum amount of memory to be allocated for shared memory which in this example is 2GB.
  • kernel.shmmni defines the maximum number of segments system-wide.
  • net.core.rmem_default and net.core.rmem_max define the default and maximum read buffer queue for network operations (1 MB in this example)
  • net.core.wmem_default and net.core.wmem_max define the default and maximum write buffer queue for network operations (256 KB in this example)
  • net.ipv4.ip_local_port_range tells the kernel the port ranges that will be used for outbound connections.
  • kernel.sem has four parameters:



    1. SEMMSL – semaphores per array
    2. SEMMNS – max semaphores system-wide (SEMMNI*SEMMSL)
    3. SEMOPM – max operations per semop call
    4. SEMMNI – max number of semaphore arrays

then issue the command below:
/sbin/sysctl -p

2) Increase the shell limits by adding following lines in /etc/security/limits.conf (at the end)
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


3) Add or edit the following line in the /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so

4) Add or edit the following line in the /etc/profile
if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
         ulimit -p 16384
         ulimit -n 65536
    else
         ulimit -u 16384 -n 65536
    fi
fi

5) Change or reset the release file /etc/redhat-release set redhat-4
cp /etc/redhat-release /etc/redhat-release.original
echo "redhat-4" > /etc/redhat-release

6) Create users and groups which will be the owners of the Oracle Software
groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
passwd oracle

7) Create Oracle Home directories
cd /
mkdir u01
cd u01/
mkdir oracle
cd oracle/
mkdir product
cd product/
mkdir 10.2.0
cd 10.2.0/
mkdir db_1
cd db_1/
pwd

8) Change the owner of the folder (root)
chown -R oracle:oinstall /u01/

9) Start the installation (oracle)

No comments:

Post a Comment