日期:2014-05-16  浏览次数:20559 次

oracle 安装步骤
1、以root用户 登录 设置系统内核参数
# vi /etc/sysctl.conf
  增加如下:
fs.file-max = 6553600
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range=1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
#kernel.shmmax=<shmmaxbytes>
kernel.shmmax=4294967296

#kernel.shmmni=<maxnumofid>
kernel.shmmni=80920

#kernel.sem=<semmsl> <semmni>*<semmsl> <semopm> <semmni>
kernel.sem=250 32000 100 128

#kernel.msgmax=<msgbytes>
#kernel.msgmax=81920
kernel.msgmax=1048576

#kernel.msgmnb=<msgmnb>
#kernel.msgmnb=16384
kernel.msgmnb=1048576

#kernel.msgmni=<msgmni>
kernel.msgmni=512

注:内存×1024×1024×1024/2,公式中内存单位为GB。内存为8GB,所以计算结果为4294967296

2、设置生效命令
  # /etc/init.d/boot.sysctl start
  # chkconfig boot.sysctl on
3、系统启动自动加载
  # sysctl -p
4、创建组与用户
  # groupadd -g 101 dba
  # useradd -u 1001 -d /opt/oracle -s /bin/bash -g dba -m oracle
  # passwd oracle

5、创建数据目录
  # mkdir -p /opt/oraInventory
  # chown -R oracle:oinstall /opt/oracle
  # chown -R oracle:dba /opt/oraInventory
  # chmod -R 775 /opt/oracle
  # chmod -R 775 /opt/oraInventory

  mkdir -p /opt/oracle/admin/websms/adump
  mkdir -p /opt/oracle/admin/websms/dpdump
  mkdir -p /opt/oracle/admin/websms/pfile
  mkdir -p /opt/oracle/cfgtoollogs/dbca/websms
  mkdir -p /opt/oracle/flash_recovery_area
  mkdir -p /opt/oracle/oradata/websms
  mkdir -p /opt/oracle/product/11g/db/dbs
  mkdir -p /opt/oracle/admin/websms/scripts
  chown -R oracle:dba /opt/oracle/
6、修改环境变量

  export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11g
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_SID=wapgw
export DISPLAY=10.10.100.100:0.0
export ORA_CRS_HOME=/opt/oracle/crs
export LD_LIBRARY_PATH=$ORACLE_HOME/lib64:$ORACLE_HOME/lib:/usr/lib
export ORACLE_DOC=$ORACLE_HOME/doc
export PATH=$PATH:/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/usr/sbin:/usr/ccs/bin:/usr/bin
export TNS_NAMES=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH ORACLE_DOCORA_NLS33
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
umask 022

7、具体安装步骤略