软件:CentOS 5.4.x
oracle 11g
第一:
坚持依赖包是否都安装:rpm -qa | grep binutils
binutils-2.15.92.0.2-18
compat-libstdc++-33.2.3-47.3
elfutils-libelf-0.97-5
elfutils-libelf-devel-0.97-5
gcc-3.4.5-2
gcc-c++-3.4.5-2
glibc-2.3.4-2.19
glibc-common-2.3.4-2.19
glibc-devel-2.3.4-2.19
glibc-headers-2.3.4-2.19
libaio-devel-0.3.105-2
libaio-0.3.105-2
libgcc-3.4.5
libstdc++-3.4.5-2
libstdc++-devel-3.4.5-2
make-3.80-5
numactl-0.6.4.i386
sysstat-5.0.5
第二步:
#groupadd oinstall
#groupadd dba
#cd /
#mkdir -p /u01/oracle
#useradd -g oinstall -G dba -d /u01/oracle oracle
#passwd oracle
#chown -R oracle:oinstall u01
第三步:配置Kernel参数
1,加入到/etc/sysctl.conf文件最后
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 1048576
net.core.wmem_max = 1048576
2,加入到/etc/security/limits.conf后面
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3,加入到/etc/pam.d/login后面
session required pam_limits.so
4,加入大/etc/profile文件后面
umask 022
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
第四步:设置oracle环境变量(切换到oracle用户)文件为/u01/oracle/.bash_profile
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=wilson
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
netca
dbca
cp /etc/skel/.bash_profile /u01/oracle
cp /etc/skel/.bashrc /u01/oracle
cp /etc/skel/.bash_logout /u01/oracle