[root@localhost ~]# memtotal=$(free -b | sed -n 2p | awk {print $2})
[root@localhost ~]# shmmax=$(expr $memtotal / 2)
[root@localhost ~]# shmmni=4096
[root@localhost ~]# pagesize=$(getconf page_size)
[root@localhost ~]# cat >> /etc/sysctl.conf << eof
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = $shmmax
kernel.shmall = $(expr \( $shmmax / $pagesize \) \* \( $shmmni / 16 \))
kernel.shmmni = $shmmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
eof
[root@localhost ~]# sysctl -p
[root@localhost ~]# vi /etc/security/limits.conf
# add to the end
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
[root@localhost ~]# vi /home/oracle/.bash_profile
# add to the end
export oracle_sid=sdzy;
export oracle_base=/u01/oracle;
export oracle_home=/u01/oracle/11.2.0/db_1;
export path=$oracle_home/bin:$path:$home/bin
export ld_library_path=$oracle_home/lib
[root@localhost ~]# reboot