4、内核及会话要求
调整内核参数,编辑/etc/sysctl.conf文件
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295 //此行默认存在,不用添加
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456 //此行默认存在,不用添加
fs.aio-max-nr = 1048576 //手动添加项
fs.file-max = 6815744
kernel.shmmni = 4096
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 = 1048586
[root@localhost ~]# sysctl –p //测试是否有错误,如果只出现这三行错误,说明正确,否则有错误
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
进行会话限制
[root@localhost ~]# vi /etc/pam.d/login //添pam认证
session required pam_limits.so
[root@dbserver ~]# vi /etc/security/limits.conf //编辑此配置文件,添加限制
Oracle soft nproc 8192 //进程数软限制
oracle hard nproc 16384 //进程数硬限制
oracle soft nofile 32768 //文件数软限制
oracle hard nofile 65536 //文件数硬限制
