Linux 下Oracle 环境变量- bash- ulimit- open files- cannot modify limit 解决
2011-03-07 16:37
441 查看
设置Oracle 环境变量的时候报错:
[oracle@qs-dmm-rh1 ~]$ source .bash_profile
-bash: ulimit: open files: cannot modify limit: 不允许的操作
设置的环境变量如下:
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
把最后一段if 判断去掉后,在source正常.
在安装Oracle 过程中还有其他几个地方参数配置:
在/etc/security/limits.conf 文件里添加:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
我们cat limits.conf 文件时,在最上面有参数的解释:
# - nofile - max number of open files
# - nproc - max number of processes
这个参数的意思和ulimit 的-u 和-n 参数作用是一样的。
关于ulimit 的更多内从,参考:
通过 ulimit 改善系统性能
http://blog.csdn.net/tianlesoftware/archive/2011/03/07/6229521.aspx
我们开始删除的那段配置,应该是写在/etc/profile 文件里的。
/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置.
Make the following changes to the default shell start-up file:
(1)For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile
file:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
(2)For the C shell, add the following lines to the /etc/csh.login file:
( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif
---------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群:62697716(满); DBA2 群:62697977(满) DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群: 83829929 DBA5群: 142216823
聊天 群:40132017
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
[oracle@qs-dmm-rh1 ~]$ source .bash_profile
-bash: ulimit: open files: cannot modify limit: 不允许的操作
设置的环境变量如下:
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
把最后一段if 判断去掉后,在source正常.
在安装Oracle 过程中还有其他几个地方参数配置:
在/etc/security/limits.conf 文件里添加:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
我们cat limits.conf 文件时,在最上面有参数的解释:
# - nofile - max number of open files
# - nproc - max number of processes
这个参数的意思和ulimit 的-u 和-n 参数作用是一样的。
-u | 用户最大可用的进程数。 |
-n | 可以打开最大文件描述符的数量。 |
通过 ulimit 改善系统性能
http://blog.csdn.net/tianlesoftware/archive/2011/03/07/6229521.aspx
我们开始删除的那段配置,应该是写在/etc/profile 文件里的。
/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置.
Make the following changes to the default shell start-up file:
(1)For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile
file:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
(2)For the C shell, add the following lines to the /etc/csh.login file:
( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif
---------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群:62697716(满); DBA2 群:62697977(满) DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群: 83829929 DBA5群: 142216823
聊天 群:40132017
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
相关文章推荐
- Linux 下Oracle 环境变量- bash- ulimit- open files- cannot modify limit 解决
- Linux 下Oracle 环境变量- bash- ulimit- open files- cannot modify limit 解决
- linux文件最大连接数问题---bash:ulimit:open files:cannot modify limit:Operation not permitted
- linux文件最大连接数问题---bash: ulimit: open files: cannot modify limit: Operation not permitted
- oracle用户登录报错-bash: ulimit: open files: cannot modify limit: Operation not permitted
- ssh 连接-bash: ulimit: open files: cannot modify limit: Operation not permit
- ulimit -c 999出现 -bash: ulimit: core file size: cannot modify limit: Operation not permitted的解决办法
- Linux下修改.bash_profile文件后再次用CRT启动环境变量未生效的解决方法,oracle命令无法使用
- -bash: ulimit: open files: cannot modify limit: Operation not permitted
- bash: ulimit: open files: cannot modify limit: 不允许的操作
- ulimit: open files: cannot modify limit 解决
- :bash: ulimit: open files: cannot modify limit: 不允许的操作
- bash:ulimit:open files:cannot modify limit:Operation not permitted
- bash: ulimit: open files: cannot modify limit: Operation not permitted
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
- ulimit: open files: cannot modify limit: Operation not permitted
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
- Linux下java环境变量配置问题,解决 重新打开bash后JDK环境变量无效问题
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument