对于 Linux 配置内核参数
编辑/etc/sysctl.conf 文件,并编辑如下所示(注意文件中已定义的修改)
#vi /etc/sysctl.conf (注释掉文中也定义好的 kernel.shmall kernel.shmmax 选项)
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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 = 1048586
输入以下命令,以更改内核参数的当前值,使当前的修改的内核参数立即生效
# /sbin/sysctl –p
Oracle 软件安装用户检查资源限制
#vi /etc/security/limits.conf 安装所有者配置文件中的资源限制(在最后一行加入如下内容)
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
配置oracel用户shell 限制:
添加以下内容到/etc/pam.d/login
#vi /etc/pam.d/login 在最下面加入如下内容
session required /lib/security/pam_limits.so
session required pam_limits.so
添加以下内容到/etc/profile
#vi /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
评论