2023年8月3日发(作者:)
Linux
内核参数
# vi /etc/
…………………………………………………………
…………………………………………………………
= 2097152
= 1024241824
= 4096
= 250 32000 100 128
-max = 6553600
_local_port_range = 1024 65000
_timestamps = 0
_sack = 1
_window_scaling = 1
_default = 4194304
_max = 4194304
_default = 262144
_max = 262144
完成后,运行以下命令激活更改:# /sbin/sysctl -p
为用户设置Shell 限制,编辑下面几个文件;
文件一# vi /etc/security/
#@student - maxlogins 4
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
文件二# vi /etc/pam.d/login
#%PAM-1.0
auth required pam_
................................................
................................................
session required /lib/security/pam_
加入红色标注的这一行;
文件三
# vi /etc/profile
………………………………………………………………………
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh do
if [ -r "$i" ]; then
. $i
fi
done
unset i
unset pathmunge
if [ $USER = "oracle" ];
then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
文件四# vi /etc/
# /etc/
...........................................
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
fi
加入红色标注的几行; umask 022
endif
加入红色标注的几行;
设置环境变量要切换到
Oracle
用户下面进行,具体怎么设置根据自己的实际情况决定:
[root@it253 ~]# su - oracle
[oracle@it253 ~]$
[oracle@it253 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
umask 022
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=orcl
2023年8月3日发(作者:)
Linux
内核参数
# vi /etc/
…………………………………………………………
…………………………………………………………
= 2097152
= 1024241824
= 4096
= 250 32000 100 128
-max = 6553600
_local_port_range = 1024 65000
_timestamps = 0
_sack = 1
_window_scaling = 1
_default = 4194304
_max = 4194304
_default = 262144
_max = 262144
完成后,运行以下命令激活更改:# /sbin/sysctl -p
为用户设置Shell 限制,编辑下面几个文件;
文件一# vi /etc/security/
#@student - maxlogins 4
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
文件二# vi /etc/pam.d/login
#%PAM-1.0
auth required pam_
................................................
................................................
session required /lib/security/pam_
加入红色标注的这一行;
文件三
# vi /etc/profile
………………………………………………………………………
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh do
if [ -r "$i" ]; then
. $i
fi
done
unset i
unset pathmunge
if [ $USER = "oracle" ];
then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
文件四# vi /etc/
# /etc/
...........................................
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
fi
加入红色标注的几行; umask 022
endif
加入红色标注的几行;
设置环境变量要切换到
Oracle
用户下面进行,具体怎么设置根据自己的实际情况决定:
[root@it253 ~]# su - oracle
[oracle@it253 ~]$
[oracle@it253 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
umask 022
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=orcl
发布评论