当前位置:Linux教程 - RedHat - 更正:RedHat7.1下安装Oracle8.1.7.0.1全过程

更正:RedHat7.1下安装Oracle8.1.7.0.1全过程



         我是linux的新手,大家多关照


    需要的软件:
    oracle81701.tar
    compat-glibc-6.2-2.1.3.2.i386.rpm(2.14MB)
    compat-libs-6.2-3.i386.rpm(1.36MB)
    compat-egcs-6.2-1.1.2.14.i386.rpm(943KB)
    IBMJava118-SD.-1.1.8-5.0.i386.rpm(10.5MB)
    setup_group.sh
    env_ctx.mk
    root.sh
    glibc-2.1.3-stubs.tar.gz

    步骤:
    ⑴root身份在RedHat7.1光盘disc1和disc2上分别找到与6.2兼容的rpm包,按顺序安装:
    compat-glibc-6.2-2.1.3.2.i386.rpm(2.14MB)
    compat-libs-6.2-3.i386.rpm(1.36MB)
    compat-egcs-6.2-1.1.2.14.i386.rpm(943KB)
    安装命令:rpm –vih compat-glibc-6.2-2.1.3.2.i386.rpm
    rpm –vih compat-libs-6.2-3.i386.rpm
    rpm –vih compat-egcs-6.2-1.1.2.14.i386.rpm


    ⑵root身份建立ora8目录,作为oracle安装目录
    命令:cd /
    mkdir ora8


    ⑶root身份安装JDK,为java提供运行环境,安装到目录/usr/jdk118下
    安装命令:rpm –vih IBMJava118-SD.-1.1.8-5.0.i386.rpm


    ⑷root身份配置java环境变量
    (假设rpm –vih IBMJava118-SD.-1.1.8-5.0.i386.rpm安装到/usr/jdk118目录)
    命令:vi /etc/profile

    写入如下内容:
    JAVA_HOME=/usr/jdk118export JAVA_HOMECLASSPATH=/usr/jdk118/libexport CLASSPATHPATH=$PATH:/usr/jdk118/bin


    ⑸root身份建立oracle用户
    到setup_group.sh文件所在目录
    命令:./ setup_group.sh
    setup_group.sh文件内容为
    #!/bin/sh# a simple Unix shell script for setting up to install Oracle 8.1.7
    groupadd dba
    groupadd oinstall
    groupadd oracle
    useradd -g dba -G oinstall,oracle -m oracle
    echo "Enter the password you want to use for user oracle"
    passwd oracle
    cd /ora8
    mkdir -p m01 m02 m03/oradata/ora8
    chown -R oracle.dba /ora8
    echo "Now download the jazzed-up bash_profile file o /home/oracle/.bash_profile"
    echo "cd /home/oracle" and "chown oracle.dba .bash_profile"
    echo "su - oracle"
    echo "You should be all set to cd /Disk1 and ./runInstaller"
    exit 0


    ⑹root身份编辑/home/oracle/.bash_profile文件
    命令:vi /home/oracle/.bash_profile
    写入如下内容:
    . /etc/shell-mods.sh
    PATH=$PATH:$HOME/bin:/usr/jdk118/bin
    NLS_LANG=american_america.zhs16cgb231280;export NLS_LANG
    . /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh


    ⑺root身份改变/home/oracle/.bash_profile文件属性
    owner为oracle,group为dba
    命令:chown oracl.dba /home/oracle/.bash_profile
    chmod 775 /home/oracle/.bash_profile


    ⑻root身份将shell-mods.sh复制到/etc
    命令:cp shell-mods.sh /etc
    shell-mods.sh文件的内容为:
    # !/bin/bash
    # This apparently is needed because of a problem with the JRE when local language /= Englishunset LANG
    # Run `. /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
    # for transparent glibc 2.1.x compatibility build environment.
    # Preprocessor will use glibc 2.1.x compatibility headers and
    # things will be linked against glibc 2.1.x compatibility libraries.
    # This will work both when linking using gcc drivers or standalone ld
    # on i386 platform.
    export LD_ASSUME_KERNEL=2.2.5
    export LDEMULATION=elf_i386_glibc21 # This is so that when genclntsh runs # ld, it first looks at /usr/i386-glibc21-linux/lib # for libraries
    export GCC_EXEC_PREFIX=/usr/i386-glibc21-linux/lib/gcc-lib/ # This is so that the gcc driver uses # the compatibility compiler
    export ORACLE_BASE=/ora8/m01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/8.1.7
    export PATH=$PATH:$ORACLE_HOME/bin
    # export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/ctx/lib
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    # export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/jdbc/lib:$ORACLE_HOME/ctx/lib
    export ORACLE_SID=ora8
    export ORACLE_TERM=vt100
    export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    umask 022


    ⑼解开备份文件oracle81701.tar到当前目录的Disk1子目录下
    命令:tar –xvf oracle81701.tar


    ⑽以oracle身份重新登录
    进入Disk1目录,运行安装程序
    命令:./runInstaller

    ⑾安装时注意事项
    注意:不要使用典型安装,因为典型安装不安装中文字符集
    注意:不要生成数据库,因为需在生成数据库前安装oracle发布的补丁程序


    ⑿安装时的选项
    UNIX Group Name:oinstall
    Install type:custom
    Product Languages选择加入Simplified Chinese
    Enter JDK Home:/usr/jdk118


    ⒀安装过程中一个窗口会弹出,要求以root身份运行/home/oracle/orainstRoot.sh
    打开一个新的终端窗口,切换到root用户身份
    命令:su
    根据提示输入root的密码
    命令:cd /home/oracle
    ./orainstRoot.sh
    不要关闭此窗口


    ⒁在被提示以root运行root.sh时, 切换到刚才保留的root用户窗口
    将root.sh拷贝入 $ORACLE_HOME,并运行
    命令:cp root.sh $ORACLE_HOME
    cd $ORACLE_HOME
    ./root.sh
    root.sh文件的内容为


    ⒂在98%时出现
    ins_ctx.mk文件无法拷入......"的问题时,先不要点击任何按钮,将文件env_ctx.mk
    复制到$ORACLE_HOME/ctx/lib,再击retry按钮即可
    命令:cp env_ctx.mk $ORACLE_HOME/ctx/lib


    ⒃oracle身份安装ORACLE自己发布的补丁
    glibc-2.1.3-stubs.tar.gz 拷贝到$ORACLE_HOME,展开,运行./setup_stubs.sh文件,补丁装完后重新启动
    命令:cp glibc-2.1.3-stubs.tar.gz /ora8/m01/app/oracle/product/8.1.7
    tar –zxvf glibc-2.1.3-stubs.tar.gz
    cd /ora8/m01/app/oracle/product/8.1.7
    ./setup_stubs.sh

    ⒄orcle身份生成数据库。 命令:dbassist
    发布人:steak 来自: