Redhat Linux AS4 安装Oracle 10g(包括启动)(2)
除sysstat包都成功安装,
sysstat包在4号盘上,rpm -i sysstat-5.0.5-1.i386.rpm
4、安装Oracle
1)添加用户组
判断用户和组是否存在
grep dba /etc/group
grep oinstall /etc/group
id oracle
id nobody
有则不添加
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
--oracle 已经存在 但不是 oinstall组,也非dba组成员
usermod -g oinstall -G dba oracle
useradd nobody
2)内核参数
Parameter Value File
semmsl 250 /proc/sys/kernel/sem
semmns 32000
semopm 100
semmni 128
shmall 2097152 /proc/sys/kernel/shmall
shmmax Half the size of physical memory (in bytes) /proc/sys/kernel/shmmax
shmmni 4096 /proc/sys/kernel/shmmni
file-max 65536 /proc/sys/fs/file-max
ip_local_port_range Minimum: 1024 /proc/sys/net/ipv4/ip_local_port_range
Maximum: 65000
rmem_default 1048576 /proc/sys/net/core/rmem_default
rmem_max 1048576 /proc/sys/net/core/rmem_max
wmem_default 262144 /proc/sys/net/core/wmem_default
wmem_max 262144 /proc/sys/net/core/wmem_max
命令
semmsl, semmns, semopm, and semmni # /sbin/sysctl -a | grep sem
shmall, shmmax, and shmmni # /sbin/sysctl -a | grep shm
file-max # /sbin/sysctl -a | grep file-max
ip_local_port_range # /sbin/sysctl -a | grep ip_local_port_range
rmem_default # /sbin/sysctl -a | grep rmem_default
rmem_max # /sbin/sysctl -a | grep rmem_max
wmem_default # /sbin/sysctl -a | grep wmem_default
wmem_max # /sbin/sysctl -a | grep wmem_max
修改配置文件/etc/sysctl.conf,增加或修改
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
重新启动
3)设置oracle用户的shell
a)增加如下行到/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
b)增加下列行到/etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
c)修改Shell默认启动文件
Bourne,Bash,Korm shell下增加下列行到/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
C shell下,增加下列行到/etc/csh.login
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif
4)创建需要的目录
mkdir /app/oracle
chown -R oracle:oinstall /app/oracle
chmod -R 775 /app/oracle
chown -R oracle:oinstall /app/oradata
相关新闻>>
- 发表评论
-
- 最新评论 更多>>