6、设置 Shell对Oracle用户的限制
以root用户身份,在每个节点上执行相同的操作。
首先,修改/etc/security/limits.conf,在文件最后添加如下内容:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
接着,修改/etc/pam.d/login,在文件最后添加如下内容:
session required /lib/security/pam_limits.so
最后,修改/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
所有修改完毕,重启所有Linux系统。
7、配置hangcheck-timer内核模块
以root用户身份执行,在所有节点上做如下配置。
查看模块是否存在:
[root@node-rac1 ~]#find /lib/modules -name "hangcheck-timer.ko"
接着,编辑/etc/modprobe.conf:
[root@node-rac1 ~]# vi /etc/modprobe.conf
在文件的末尾加入一行:
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
然后,将hangcheck-timer模块配置为自启动:
[root@node-rac1 ~]#vi /etc/rc.d/rc.local
在文件的末尾加入一行:
/sbin/modprobe hangcheck_timer
接着,启动hangcheck:
[root@node-rac1 ~]# /sbin/modprobe hangcheck_timer
最后,检查hangcheck是否成功启动:
[root@node-rac1 ~]#grep hangcheck /var/log/messages | tail -2
Aug 26 19:08:17 Mysql1 kernel: Hangcheck: starting hangcheck timer 0.9.0 (tick is 30 seconds, margin is 180 seconds).
如果显示上面输出信息说明已经成功启动hangcheck。
