安装RAC遇到bash: ulimit: open files: cannot modify limit: Operation not permitted
在装RAC过程中,给oracle用户配置环境变量时,提示该错误,如下:
1 [root@rac1 ~]# su - oracle 2 -bash: ulimit: open files: cannot modify limit: Operation not permitted 3 [oracle@rac1 ~]$ cat /etc/ssh/sshd_config 4 cat: /etc/ssh/sshd_config: Permission denied 5 [oracle@rac1 ~]$ source .bash_profile 6 -bash: ulimit: open files: cannot modify limit: Operation not permitted 7 [oracle@rac1 ~]$ source .bash_profile 8 -bash: ulimit: open files: cannot modify limit: Operation not permitted
一开始以为是路径的问题,检查后发现路径并没有问题。于是上网查资料,部分资料是让修改/etc/ssh/sshd_config中的UseLogin;把no改为yes,但我发现这样改完后并没用消除这个错误,后来在一篇文章中提到了limit.conf(http://blog.chinaunix.net/uid-26408805-id-3305380.html);
于是将如下代码加入limit.conf文件中:
1 grid soft nproc 2047 2 grid hard nproc 16384 3 grid soft nofile 1024 4 grid hard nofile 65536 5 oracle soft nproc 2047 6 oracle hard nproc 16384 7 oracle soft nofile 1024 8 oracle hard nofile 65536
再次刷新变量就正常了。
1 [oracle@rac1 ~]$ source .bash_profile 2 [oracle@rac1 ~]$