使用Oracle用户登陆:
#su – oracle
#vi .bash_profile
以下是配置文件的内容
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# Kernel sysctl configuration file for Red Hat Linux
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
(修改后运行#sysctl –p命令使得内核改变立即生效;kernel.shmmax为最大共享内存建议设置成物理内存的一般,如物理内存是 1G,则可以设置最大共享内存为 512 * 1024 * 1024 = 536870912,sem 4个参数依次为SEMMSL(每个用户拥有信号量最大数);SEMMNS(系统信号量最大数);SEMOPM(每次semopm系统调用操作数); SEMMNI(系统辛苦量集数最大数).Shmmax 最大共享内存,官方文档建议是内存的1/2,Shmmni 最小共享内存 4096KB.Shmall 所有内存大小 。
b) 设置oracle对文件的要求: (这里也要添加,不添加的话ORACLE会由于文件的limit造成RED HAT的死机)
编辑文件:#vi /etc/security/limits.conf 加入以下语句:
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384