1. CentOS 6.4 桌面系统,卸载了自带的java7和不用的其它软件,不带openoffice等办公及娱乐软件,安装后yum update升级系统到最新,安装Qt4编译需要的开发包。
2. 安装Oracle依赖包(针对386版本的centos,仅需要前两行即可)
yum install kernel-devel kernel-headers binutils-devel dos2unix lrzsz python-devel compat-db compat-gcc-34 compat-gcc-34-c++ compat-libstdc++-33 glibc-devel ksh
yum install libaio-devel numactl-devel unixODBC unixODBC-devel elfutils-libelf-devel-static elfutils-libelf-devel libtermcap-devel readline-devel libXp
yum install libgcc_s.so.1 libXp.i686 libXt.i686 libXtst.i686 libXpm-devel.i686 libaio-devel.i686 glibc-devel.i686 libstdc++-devel.i686 compat-libstdc++-33.i686
3. 编辑/etc/hosts,最后追加行,加入主机名和ip(ipconfig查看ip)(否则dbca时创建数据库过程报ORA-00600错误)
192.168.109.129 rheicentos
4. 创建oracle用户和安装相关目录
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle
usermod -g oinstall -G dba oracle
mkdir -p /opt/oracle
chown -R oracle:oinstall /opt/oracle
chmod -R 755 /opt/oracle
5. 编辑/etc/sysctl.conf,最后追加行
cat >> /etc/sysctl.conf << EOF
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144
EOF
执行sysctl -p使设置生效
6. 编辑/etc/security/limits.conf(设置Shell限制),最后追加行
cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
7. 编辑/etc/pam.d/login,最后追加行
cat >> /etc/pam.d/login << EOF
session required pam_limits.so
EOF
8. 编辑/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
9. 编辑/etc/csh.login,最后追加行
if ( $USER == "oracle") then
limit maxproc 16384
limit descriptors 65536
endif
10.编辑/home/oracle/.bash_profile,最后追加行
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/10201
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin