首页 > 代码库 > redhat5.9 32位系统上安装oracle11.2.0g

redhat5.9 32位系统上安装oracle11.2.0g


  1. groupadd dba

    groupadd oinstall

    useradd -g oinstall  -G  dba  oracle

    passwd  oracle

  2. mkdir  /opt/oracle  -pv

    chown  -R   oracle.oinstall  /opt/oracle

  3. 检查依赖包:

    binutils

    compat-libstdc

    gcc

    gcc-c++

    glibc

    glibc-common

    glibc-devel

    glibc-headers

    kernel-headers

    ksh

    libaio

    libaio-devel

    libgcc

    libgomp

    libstdc++

    libstdc++44-devel

    make

    numactl-devel

    sysstat

    unixODBC

    unixODBC-devel

  4. 安装java

    jdk-1_5_0_06-linux-i586.bin

    sh jdk-1_5_0_06-linux-i586.bin

    cp  -rv  jdk-1_5_0_06  /usr/local

    ln -s /usr/local/jdk-1_5_0_06/  /usr/local/jdk

    ln -s /usr/local/jdk-1_5_0_06/jre  /usr/local/jre

    ln -s /usr/local/jdk-1_5_0_06/bin/java  /usr/bin/java

    ln -s /usr/local/jdk-1_5_0_06/bin/javac  /usr/bin/javac

  5. 配置Java环境变量

    cd /etc/profile.d

    vi java.sh

    export JAVA_HOME=/usr/local/jak

    export PATH=$PATH:$JAVA_HOME/bin

    export CLASSPATH=$JAVA_HOME/lib/tools.tar:.:$JAVA_HOME/lib/dt.jar

  6. 系统配置

    chkconfig iptables off

    selinux=disabled

  7. 内核配置

    oracle soft    nproc           2047

    oracle soft    nofile          1024

    oracle hard    nproc           16384

    oracle hard    nofile          65536

  8. 内核优化参数

    vi /etc/sysctl.conf

                 net.ipv4.ip_forward= 0

    net.ipv4.conf.default.rp_filter = 1

    net.ipv4.conf.default.accept_source_route =0

    kernel.sysrq = 0

    kernel.core_uses_pid = 1

    net.ipv4.tcp_syncookies = 1

    net.ipv4.ip_local_port_range = 1024 65500

    kernel.msgmnb = 65536

    kernel.msgmax = 65536

    kernel.shmmax = 4294967295

    kernel.shmall = 268435456

    kernel.shmmni = 4096

    kernel.sem = 250 32000 100 128

    fs.file-max = 65536

    net.core.rmem_default = 262144

    net.core.rmem_max = 262144

    net.core.wmem_deault = 262144

    net.core.wmem_max  = 262144

  9. 配置oracle环境变量


    export TMP=/tmp
    export TMPDIR=$TMP
    export ORACLE_BASE=/opt/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
    export ORACLE_SID=orcl
    export ORACLE_TERM=xterm
    export PATH=/usr/sbin:$PATH
    export PATH=$ORACLE_HOME/bin:$PATH
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
    export DISPLAY=:0.0
    export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

    ###############################################################################
    ###set  jdk  environment
    JAVA_HOME=/usr/local/jdk;export  JAVA_HOME
    #PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/lib/i386:$HOME/bin:/home/oracle/bin:/opt/oracle/product/11.2.0/bin;export  PATH
    PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/lib/i386:/home/oracle/bin:$ORACLE_HOME/bin ;export  PATH
    NLS_LANG="SIMPLIFIED CHINESE_CHINA".ZHS16GBK;export NLS_LANG
    #export NLS_LANG="AMERICAN_CHINA.ZHS16GBK"
    #
    LC_CTYPE=zh_CN.GB2312
    LC_ALL=zh_CN
    LANG=zh_CN.GB2312
    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

  10. 开始安装

      xhost local:oracle non-network localconnections being added to access control list

11.     su - oracle

      cd /opt/oracle/database

      export  LANG=c

      ./runinstaller


本文出自 “常用文档” 博客,请务必保留此出处http://yujianglei.blog.51cto.com/7215578/1559218

redhat5.9 32位系统上安装oracle11.2.0g