当前位置导航:炫浪网>>网络学院>>操作系统>>Linux教程

在Redhat 7.2上安装Oracle 8.1.7


  作者:吴阿亭
  
  一 文章简介
  本文主要介绍如何在redhat 7.2中一步步安装oracle 8.1.7.0.1,如何解决安装过程中遇到的问题及其如何修补几个bug 。
  
  二 操作环境
  Redhat 7.2, Oracle 8.1.7.0.1; DELL PC 128M RAM , 9G硬盘, 1G SWAP分区
  
  三 安装步骤
  
  1. 准备软硬件环境
  做Redhat 7.2 完全安装是最容易的方法,否则你需要确认下面的兼容包被安装在系统中,简单地就安装
  所有的compat开头的包。
  
  compat-libstdc++-6.2-2.9.0.16
  compat-glibc-6.2-2.1.3.2
  compat-egcs-c++-6.2-1.1.2.16
  compat-libs-6.2-3
  compat-egcs-6.2-1.1.2.16
  compat-egcs-objc-6.2-1.1.2.16
  
  下载Oracle 8.1.7.0.1, glibc-2.1.3-stubs.tar.gz, JDK-1.1.8(http://www.blackdown.org)(jdk118_v3-glibc-2.1.3.tar.bz2)
  
  2. 安装JAVA环境
  
  cd /usr/local
  bunzip2 jdk118_v3-glibc-2.1.3.tar.bz2
  tar xvf jdk118_v3-glibc-2.1.3.tar
  ln -s /usr/local/jdk118_v3 /usr/local/java
  
  3. 准备oracle 用户,组和环境变量
  
  groupadd oinstall
  groupadd dba
  groupadd oper
  
  useradd oracle -g oinstall -G dba,oper
  passwd oracle (改变oracle用户的密码)
  
  mkdir /u01
  chown oracle.dba /u01
  chmod 775 /u01
  
  然后放下面的行到/home/oracle/.bash_profile.
  
  ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
  ORACLE_HOME=/u01/app/oracle/product/8.1.7; export ORACLE_HOME
  ORACLE_SID=ora1; export ORACLE_SID
  PATH=$PATH:/u01/app/oracle/product/8.1.7/bin; export PATH
  CLASSPATH=.:/u01/app/oracle/product/8.1.7/jdbc/lib/classes111.zip; export CLASSPATH
  LD_LIBRARY_PATH=/u01/app/oracle/product/8.1.7/lib; export LD_LIBRARY_PATH
  ORA_NLS33=/u01/app/oracle/product/8.1.7/ocommon/nls/admin/data; export ORA_NLS33
  NLS_LANG=american; export NLS_LANG
  umask 022
  
  然后退出所有终端,重新登录确保环境变量生效,用env检查所有变量,最方便地是重新启动系统。
  
  4. 开始安装Oracle
  
  a. 登录作为用户oracle,进入KDE界面,解开下载的文件在/usr/src下并开始安装。
  
  LD_ASSUME_KERNEL=2.2.5; export LD_ASSUME_KERNEL
  . /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
  cd /usr/src
  tar xvfz linux81701.tar.gz
  cd Disk1
  ./runInstaller
  
  b. 在Unix组名提示时,填入oinstall,然后按next,会弹出让你在另一个终端窗口运行orainstRoot.sh的提示,在另一终端登录作为root,做下面的
  
  cd /u01/app/oracle/product/8.1.7/
  ./orainstRoot.sh
  Creating Oracle Inventory pointer file (/etc/oraInst.loc)
  Changing groupname of /u01/app/oracle/oraInventory to oinstall.
  
  JDK HOME中接受默认/usr/local/java, 给oracle global database 取名。
  
  c. 在安装到最后Linking Oracle8i Enterprise Edition 8.1.7.0.1 , 97%时,会有一错误提示,
  Error in invoking target install of makefile /u01/app/oracle/product/8.1.7/ctx/lib/ins_ctx.mk
  
  则需要在另一终端窗口下运行glibc修补文件glibc-2_1_3-stubs_tar.gz, 在另一终端下登录作为oracle,然后
  
  cd /u01/app/oracle/product/8.1.7
  tar xvfz /usr/src/glibc-2_1_3-stubs_tar.gz
  ./setup_stubs.sh
  
  出现如下的提示:
  Setting up patch files...done.
  Patching makefiles as necessary:
  checking file '/u01/app/oracle/product/8.1.7/rdbms/demo/demo_rdbms.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/rdbms/demo/ociucb.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/rdbms/lib/ins_rdbms.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/rdbms/lib/env_rdbms.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/network/lib/ins_net_client.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/network/lib/env_network.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/network/lib/ins_cman.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/network/lib/ins_names.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/network/lib/ins_oemagent.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/network/lib/env_oemagent.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/network/lib/ins_net_server.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/network/lib/ins_nau.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/plsql/lib/env_plsql.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/plsql/lib/ins_plsql.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/plsql/demo/demo_plsql.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/precomp/lib/ins_precomp.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/precomp/lib/env_precomp.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/ldap/lib/env_ldap.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/ldap/lib/ins_ldap.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/ldap/demo/demo_ldap.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/sqlplus/lib/env_sqlplus.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/sqlplus/lib/ins_sqlplus.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/ord/im/lib/env_ordim.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/ord/img/demo/demo_ordimg.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/ord/ts/demo/oci/src/demo_ordts.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/ord/ts/demo/proc/src/demo_ordts.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/ord/ts/lib/env_ordts.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/md/demo/examples/demo_sdo.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/md/demo/unix/motif/src/demo_motif.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/md/demo/unix/motif/src/db_src/demo_dbsrc.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/md/demo/unix/motif/src/main_src/demo_mainsrc.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/otrace/demo/atmoci.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/otrace/lib/env_otrace.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/otrace/lib/ins_otrace.mk'...OK.
  checking file '/u01/app/oracle/product/8.1.7/ctx/lib/env_ctx.mk'...patched.
  checking file '/u01/app/oracle/product/8.1.7/ctx/lib/ins_ctx.mk'...OK.
  Rebuilding client shared library...done.
  Relinking executables:
  running 'ins_rdbms.mk'...done.
  running 'ins_net_client.mk'...done.
  running 'ins_cman.mk'...done.
  running 'ins_names.mk'...done.
  running 'ins_oemagent.mk'...done.
  running 'ins_net_server.mk'...done.
  running 'ins_nau.mk'...done.
  running 'ins_plsql.mk'...done.
  running 'ins_precomp.mk'...done.
  running 'ins_ldap.mk'...done.
  running 'ins_sqlplus.mk'...done.
  running 'ins_otrace.mk'...done.
  running 'ins_ctx.mk'...done.
  
  还没有完,然后再做下面的
  cd /u01/app/oracle/product/8.1.7/ctx/lib
  vi env_ctx.mk
  更改1374行 (vi 文件,然后打入1374 G 直接跳到该行 )
  CTXHX_LINKLINE=$(LINK) $(CTXLIB)ctxhx.$(OBJ_EXT) $(INSO_LINK) $(USRLIBS)
  在最后加上 -ldl 变成
  CTXHX_LINKLINE=$(LINK) $(CTXLIB)ctxhx.$(OBJ_EXT) $(INSO_LINK) $(USRLIBS) -ldl
  再回到安装界面击retry.
  
  d. 弹出窗口要运行root.sh,提示如下:
  A configuration script needs to be run as root before installation can proceed. Please leave this windows up, go run /u01/app/oracle/product/8.1.7/root.sh as root from another window,then come back here and click OK to continue.
  
  这个root.sh script有两处错误,我们先正确它们再运行。
  
  更改/u01/app/oracle/
相关内容
赞助商链接