【Installation】Oracle9i在Oracle Linux 5 32bit上的成功安装




  • 1    工作描述

    9i由于版本过老,导致很难在Oracle Linux 5 64bit上安装成功。虽然有人说安装成功,但由于操作过于复杂,还需要找9.2.0.4以上的安装介质,因此我没有亲自尝试。幸运的是,9i可以在Oracle Linux 5 32bit上成功安装,尽管也历经了众多的报错,但最终还是安装上了,虽然不是64bit,至少也是一种搭建9i环境的方法。整个安装过程,请见下文。
    注:此种方法同样适用于Redhat 5,由于本文主要描述9i如何成功部署在Oracle Linux 5 32bit上,因此创建组和用户,以及修改操作系统限制等操作(和10g没有区别)在本文中忽略。

    2    开始安装

    [oracle@secdb1 Disk1]$ ./runInstaller
    [oracle@secdb1 Disk1]$ Initializing Java Virtual Machine FROM /tmp/OraInstall2013-05-14_06-07-00PM/jre/bin/java. Please wait...
    /tmp/OraInstall2013-05-14_06-07-00PM/jre/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot OPEN shared object file: No such file OR directory

    报错的原因是由于低版本的数据库安装需要调用老版本的动态库,而由于系统上只存在高版本的动态库,版本不匹配导致报错。解决方法也很容易,就是通过建立软连接的方式解决 。

    [root@secdb1 ~]# ln -s /usr/lib/libstdc++-libc6.2-2.so.3 /usr/lib/libstdc++-libc6.1-1.so.2

    重新执行runInstaller后继续报错。

    [oracle@secdb1 Disk1]$ ./runInstaller
    [oracle@secdb1 Disk1]$ Initializing Java Virtual Machine FROM /tmp/OraInstall2013-05-14_06-11-16PM/jre/bin/java. Please wait...
    Error occurred during initialization OF VM
    Unable TO LOAD native library: /tmp/OraInstall2013-05-14_06-11-16PM/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 NOT defined IN file libc.so.6 WITH link TIME reference

    这个错误是由于Oracle bug 3006854引起的,解决方法是到MOS上下载p3006854_9204_LINUX.zip补丁,打上这个补丁后终于可以看到久违的OUI了。

    [oracle@secdb1 ~]$ unzip p3006854_9204_LINUX.zip
    Archive:  p3006854_9204_LINUX[Patch 3006854 CAN NOT INSTALL ORACLE 9.2.0.1.0 DB ON RHEL3 ALPHA 4].zip
    creating: 3006854/
    inflating: 3006854/rhel3_pre_install.sh
    inflating: 3006854/README.txt
    [oracle@secdb1 ~]$ cd 3006854
    [root@secdb1 3006854]# ./rhel3_pre_install.sh
    Applying patch...
    Ensuring permissions are correctly SET...
    Done.
    Patch successfully applied

    3    OUI操作

    (1).欢迎界面,点击“Next”;
    1.[ID 20130515.1]
    (2).修改Name和Path,点击“Next”;
    2.[ID 20130515.1]
    (3).选择“Oracle9i Database 9.2.0.4.0”,点击“Next”;
    3.[ID 20130515.1]
    (4).选择“Enterprise Edition”,点击“Next”;
    4.[ID 20130515.1]
    (5).选择“Software Only”,点击“Next”;
    5.[ID 20130515.1]
    (6).安装总缆,确认无误后,点击“Install”;
    6.[ID 20130515.1]
    (7).开始安装数据库软件,点击“Next”;
    7.[ID 20130515.1]
    (8).先后会要求输入Disk2、Disk3的路径,点击“OK”;
    8.[ID 20130515.1]
    (9).执行root脚本后,点击“OK”;
    9.[ID 20130515.1]
    以root用户执行root脚本:

    [root@secdb1 db_1]# /u01/app/oracle/product/9.2.0/db_1/root.sh
    Running Oracle9 root.sh script...
    \nThe following environment VARIABLES are SET AS:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/9.2.0/db_1

    Enter the FULL pathname OF the LOCAL bin directory: [/usr/LOCAL/bin]:
    The file "dbhome" already EXISTS IN /usr/LOCAL/bin.  Overwrite it? (y/n)
    [n]: n
    The file "oraenv" already EXISTS IN /usr/LOCAL/bin.  Overwrite it? (y/n)
    [n]: n
    The file "coraenv" already EXISTS IN /usr/LOCAL/bin.  Overwrite it? (y/n)
    [n]: n

    Adding entry TO /etc/oratab file...
    Entries will be added TO the /etc/oratab file AS needed BY
    DATABASE Configuration Assistant WHEN a DATABASE IS created
    Finished running generic part OF root.sh script.
    Now product-specific root actions will be performed.

    (10). 安装完成,如果不继续安装其他产品,点击“Exit”,还需要安装其他产品,点击“Next Install”;
    10.[ID 20130515.1]

    4    使用NETCA创建监听器

    使用netca启动图形界面来配置监听,和10g没有区别,一路“Next”;
    11.[ID 20130515.1]
    选择“Add”;
    12.[ID 20130515.1]
    使用默认的LISTENER名称;
    13.[ID 20130515.1]
    选择默认的TCP协议;
    14.[ID 20130515.1]
    使用默认的1521端口;
    15.[ID 20130515.1]
    完成
    16.[ID 20130515.1]
    17.[ID 20130515.1]
    18.[ID 20130515.1]

    5    使用DBCA建库

    [oracle@secdb1 ~]$ dbca
    /u01/app/oracle/jre/1.1.8/bin/../lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 NOT defined IN file libc.so.6 WITH link TIME reference (libzip.so)
    Unable TO initialize threads: cannot find class java/lang/Thread
    Could NOT CREATE Java VM

    又出现报错,出错的原因是由于dbca建库时调用的oracle自带的jre版本过低,需要下载安装新版本的jre,然后用高版本的jre替换低版本的即可正常运行dbca。
    操作步骤如下:

    [oracle@secdb1 ~]$ cd $ORACLE_HOME
    [oracle@secdb1 db_1]$ mv JRE JRE_BAK
    [oracle@secdb1 db_1]$ ln -s  ~/jre1.6.0_45/ JRE
    [oracle@secdb1 ~]$ cd /u01/app/oracle/product/9.2.0/db_1/JRE/bin/
    [oracle@secdb1 ~]$ ln -s java jre
    [oracle@secdb1 ~]$ cd /u01/app/oracle/product/9.2.0/JRE/lib/i386/native_threads
    [oracle@secdb1 ~]$ ln -s java jre

    再次启动DBCA

    [oracle@secdb1 ~]$ dbca

    点击“Next”
    19.[ID 20130515.1]
    选择“Create a database”,创建数据库,点击“Next”;
    20.[ID 20130515.1]
    选择“New Database”,创建一个新的数据库,点击“Next”;
    21.[ID 20130515.1]
    输入SID,点击“Next”;
    22.[ID 20130515.1]
    选择数据库组件,点击“Next”;
    23.[ID 20130515.1]
    选择“Dedicate Server Mode”专用模式,点击“Next”;
    24.[ID 20130515.1]
    设置Memory,Character,DB size,File Locations,Archive;
    25.[ID 20130515.1]
    26.[ID 20130515.1]
    27.[ID 20130515.1]
    28.[ID 20130515.1]
    29.[ID 20130515.1]
    存储参数设置,点击“Next”;
    30.[ID 20130515.1]
    点击“Finish”;
    31.[ID 20130515.1]
    总述界面,点击“OK”;
    32.[ID 20130515.1]
    开始安装;
    33.[ID 20130515.1]
    安装过程中出现ORA-01430的报错,点击“Ignore”忽略;
    解释:在数据库创建过程的“增加 Oracle Spatial”阶段中,您将接收到一个 ORA-01430 错误。如果您搜索日志文件,您将看到以下内容: (SDO_ROOT_MBR mdsys.sdo_geometry) * ERROR at line 2: ORA-01430:column being added already exists in table这是一个已知的问题,并可被忽略。要继续数据库创建过程,请单击 "Ignore" 按钮;
    34.[ID 20130515.1]
    输入SYS和SYSTEM用户的密码后,点击“Exit”,退出DBCA,安装完成。
    35.[ID 20130515.1]

    6    登录数据库

    [oracle@secdb1 ~]$ sqlplus '/ as sysdba'

    SQL*Plus: Release 9.2.0.4.0 - Production ON Wed May 15 15:33:38 2013
    Copyright (c) 1982, 2002, Oracle Corporation.  ALL rights reserved.
    Connected TO:

    Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    WITH the Partitioning, OLAP AND Oracle DATA Mining options
    JServer Release 9.2.0.4.0 - Production

    SQL> SELECT STATUS FROM v$instance;

    STATUS
    ------------
    OPEN

    SQL>
    京ICP备14059771号-2