RHEL5.4与SLES11下安装oracle9i

一个古老的系统(AIX4.3+oracle9i)需要迁移到新的x86机器,并且没有开发人员的支持,为了适应新的机器,操作系统打算使用RHEL5.4或者SLES11 SP1。
一开始在64位SUSE Linux Enterprise Server 11 SP1下安装oracle9i,当进行到18%时hang住了,此时显示的是copying naeet.o。
换成在64位Red Hat Enterprise Linux Server release 5.4下安装oracle9i,当进行到17%时hang住,此时也显示的是copying naeet.o。
google了很久也没用找到办法,估计也没人安装成功过,于是换成32位操作系统测试,都成功了,记录如下。
(一)先说SUSE LINUX。
32位SUSE Linux Enterprise Server 11下安装oracle9i需要下载2个RPM:
1)compat-2010.1.31-6.1.i586.rpm,下载地址:
http://download.csdn.net/download/lordcoohoo/4704111
2)gcc_old-2.95.3-175.2.i586.rpm,下载地址:
http://download.csdn.net/download/lordcoohoo/4704133
先安装compat-2010.1.31-6.1.i586.rpm,再安装gcc_old-2.95.3-175.2.i586.rpm。
gcc安装完毕还需要进行如下设置:
# cd /usr/lib
# ln -s /opt/gcc295/bin/gcc /usr/bin/gcc
# ln -s /opt/gcc295/bin/g++ /usr/bin/g++
第1个RPM不安装的话,安装会报错,如下:
oracle@suse11:~/source/Disk1> ./runInstaller
oracle@suse11:~/source/Disk1> Initializing Java Virtual Machine from /tmp/OraInstall2012-10-29_04-09-38PM/jre/bin/java. Please wait...
/tmp/OraInstall2012-10-29_04-09-38PM/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
第2个RPM不安装的话,安装到61%的时候出错:
Error in invoking target relink of makefile /opt/oracle/product/9iR2/precomp/lib/ins_precomp.mk
安装到最后运行root.sh的时候会报错:
suse11:/usr/lib # /opt/oracle/product/9iR2/root.sh
Running Oracle9 root.sh script...
\nThe following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /opt/oracle/product/9iR2

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

\nCreating /etc/oratab file...
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.

Starting RPM to install the Legato Single Server Version (LSSV) product.
Form more information, please refer to the Linux installation section
in the LSSV Installation Guide at  http://www.legato.com/LSSV

error: Failed dependencies:
        libncurses.so.4 is needed by orclclnt-nw_lssv.Build.71-1.i386
        libtermcap.so.2 is needed by orclclnt-nw_lssv.Build.71-1.i386
error: Failed dependencies:
        orclclnt = nw_lssv.Build.71-1 is needed by orcldrvr-nw_lssv.Build.71-1.i                                                                                                                     386
error: Failed dependencies:
        orclclnt = nw_lssv.Build.71-1 is needed by orclnode-nw_lssv.Build.71-1.i                                                                                                                     386
        orcldrvr = nw_lssv.Build.71-1 is needed by orclnode-nw_lssv.Build.71-1.i                                                                                                                     386
        libscsi.so is needed by orclnode-nw_lssv.Build.71-1.i386
        libsji.so is needed by orclnode-nw_lssv.Build.71-1.i386
error: Failed dependencies:
        orclclnt = nw_lssv.Build.71-1 is needed by orclserv-nw_lssv.Build.71-1.i                                                                                                                     386
        orclnode = nw_lssv.Build.71-1 is needed by orclserv-nw_lssv.Build.71-1.i                                                                                                                     386

**      Installation of LSSV did not succeed.  Please refer
**      to the Installation Guide at http://www.legato.com/LSSV
**      and contact Oracle customer support if necessary.

/bin/chmod: cannot access `/opt/oracle/product/9iR2/network/agent/html': No such                                                                                                                      file or directory
suse11:/usr/lib #
以上错误不用理会,继续安装9208的补丁,安装9208的整个过程不会出现任何问题。
接下来创建数据库又遇到问题:
oracle@suse11:~> dbca
/opt/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
不用理会,手工建库吧:
oracle@suse11:~> cd $ORACLE_HOME/dbs
oracle@suse11:~/product/9iR2/dbs> ls
initdw.ora  init.ora
oracle@suse11:~/product/9iR2/dbs> vi initvic.ora
oracle@suse11:~/product/9iR2/dbs> orapwd
orapwd   orapwdO
oracle@suse11:~/product/9iR2/dbs> orapwd file=orapwvic password=oracle
oracle@suse11:~/product/9iR2/dbs> ls
initdw.ora  init.ora  initvic.ora  orapwvic
oracle@suse11:~/product/9iR2/dbs> echo $ORACLE_SID
vic
oracle@suse11:~/product/9iR2/dbs> sqlplus /nolog

SQL*Plus: Release 9.2.0.8.0 - Production on Tue Oct 30 04:02:49 2012

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.

Total System Global Area   97587796 bytes
Fixed Size                   451156 bytes
Variable Size              46137344 bytes
Database Buffers           50331648 bytes
Redo Buffers                 667648 bytes
SQL> create database;

Database created.

SQL> select name from v$tablespace;

NAME
------------------------------
SYSTEM

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/opt/oracle/product/9iR2/dbs/dbs1vic.dbf

SQL> create tablespace users datafile '/opt/oracle/product/9iR2/dbs/users01.dbf' size 50m extent management local segment space management auto;
create tablespace users datafile '/opt/oracle/product/9iR2/dbs/users01.dbf' size 50m extent management local segment space management auto
*
ERROR at line 1:
ORA-00406: COMPATIBLE parameter needs to be 9.0.1.3.0 or greater


SQL> create spfile from pfile;

File created.

SQL> startup force
ORACLE instance started.

Total System Global Area   97587796 bytes
Fixed Size                   451156 bytes
Variable Size              46137344 bytes
Database Buffers           50331648 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      8.1.0

SQL> alter system set compatible='9.2.0.8' scope=spfile;

System altered.

SQL> startup force
ORACLE instance started.

Total System Global Area   97587796 bytes
Fixed Size                   451156 bytes
Variable Size              46137344 bytes
Database Buffers           50331648 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      9.2.0.8
SQL> create tablespace users datafile '/opt/oracle/product/9iR2/dbs/users01.dbf' size 50m extent management local segment space management auto;

Tablespace created.

SQL> create temporary tablespace temp tempfile '/opt/oracle/product/9iR2/dbs/temp01.dbf' size 200m;

Tablespace created.

SQL> create undo tablespace undotbs1 datafile '/opt/oracle/product/9iR2/dbs/undotbs01.dbf' size 200m;

Tablespace created.

SQL> alter database default temporary tablespace temp;

Database altered.

SQL> show parameter undo

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      MANUAL
undo_retention                       integer     900
undo_suppress_errors                 boolean     FALSE
undo_tablespace                      string
SQL> alter system set undo_tablespace='UNDOTBS1' scope=spfile;

System altered.

SQL> alter system set undo_management=auto scope=spfile;

System altered.

SQL> startup force
ORACLE instance started.

Total System Global Area   97587796 bytes
Fixed Size                   451156 bytes
Variable Size              46137344 bytes
Database Buffers           50331648 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL> @?/rdbms/admin/catalog
DOC>######################################################################
DOC>######################################################################
DOC>    The following statement will cause an "ORA-01722: invalid number"
DOC>    error and terminate the SQLPLUS session if the user is not SYS.
DOC>    Disconnect and reconnect with AS SYSDBA.
DOC>######################################################################
DOC>######################################################################
DOC>#

no rows selected




Comment created.


Comment created.


Commit complete.


PL/SQL procedure successfully completed.

SQL> @?/rdbms/admin/catproc

(二)再说REDHAT LINUX。
32位Red Hat Enterprise Linux Server release 5.4下安装oracle9i除了要下载一个JRE以外,不用下载其他RPM。
[oracle@rhel5 Disk1]$ ./runInstaller
[oracle@rhel5 Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2012-10-29_10-30-48PM/jre/bin/java. Please wait...
/tmp/OraInstall2012-10-29_10-30-48PM/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
这是遇到的第一个错误,很容易解决,如下:
[oracle@rhel5 Disk1]$ su -
[root@rhel5 ~]# cd /usr/lib
[root@rhel5 lib]# ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2
[root@rhel5 lib]# exit
[oracle@rhel5 Disk1]$ ./runInstaller
[oracle@rhel5 Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2012-10-30_03-12-03PM/jre/bin/java. Please wait...
Error occurred during initialization of VM
Unable to load native library: /tmp/OraInstall2012-10-30_03-12-03PM/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
这是遇到的第二个错误,google之后得到Solution:
下载j2re-1_3_1_19-linux-i586.bin,网址:http://download.csdn.net/download/lordcoohoo/4703935
下载文件上传到/opt目录下安装:
[root@rhel5 opt]# pwd
/opt
[root@rhel5 opt]# chmod +x j2re-1_3_1_19-linux-i586.bin
[root@rhel5 opt]# ./j2re-1_3_1_19-linux-i586.bin
安装完毕修改Disk1/install/linux/oraparam.ini文件如下:
JRE_LOCATION=/opt/jre1.3.1_19
继续开始安装:
[oracle@rhel5 Disk1]$ ./runInstaller
[oracle@rhel5 Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2012-10-30_03-58-41PM/jre/bin/java. Please wait...
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2012-10-30_03-58-41PM/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1414)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1330)
        at java.lang.Runtime.loadLibrary0(Runtime.java:744)
        at java.lang.System.loadLibrary(System.java:815)
        at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:48)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:36)
        at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29)
        at java.awt.Component.<clinit>(Component.java:351)
        at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:593)
这是遇到的第三个错误,原来是缺少了2个rpm,很容易在rhel5.4光盘里找到,马上安装:
[root@rhel5 Server]# rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
warning: libXp-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libXp                  ########################################### [100%]
[root@rhel5 Server]#
[root@rhel5 Server]# rpm -ivh libXp-devel-1.0.0-8.1.el5.i386.rpm
warning: libXp-devel-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libXp-devel            ########################################### [100%]

继续runInstaller,终于出现图形界面了!
安装到最后要你运行root.sh,报错了:
[root@rhel5 Server]# /opt/oracle/product/9iR2/root.sh
Running Oracle9 root.sh script...
\nThe following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /opt/oracle/product/9iR2

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

\nCreating /etc/oratab file...
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.

Starting RPM to install the Legato Single Server Version (LSSV) product.
Form more information, please refer to the Linux installation section
in the LSSV Installation Guide at  http://www.legato.com/LSSV

error: Failed dependencies:
        libncurses.so.4 is needed by orclclnt-nw_lssv.Build.71-1.i386
error: Failed dependencies:
        orclclnt = nw_lssv.Build.71-1 is needed by orcldrvr-nw_lssv.Build.71-1.i386
error: Failed dependencies:
        orclclnt = nw_lssv.Build.71-1 is needed by orclnode-nw_lssv.Build.71-1.i386
        orcldrvr = nw_lssv.Build.71-1 is needed by orclnode-nw_lssv.Build.71-1.i386
        libscsi.so is needed by orclnode-nw_lssv.Build.71-1.i386
        libsji.so is needed by orclnode-nw_lssv.Build.71-1.i386
error: Failed dependencies:
        orclclnt = nw_lssv.Build.71-1 is needed by orclserv-nw_lssv.Build.71-1.i386
        orclnode = nw_lssv.Build.71-1 is needed by orclserv-nw_lssv.Build.71-1.i386

**      Installation of LSSV did not succeed.  Please refer
**      to the Installation Guide at http://www.legato.com/LSSV
**      and contact Oracle customer support if necessary.

不管它!马上打9208的patch,安装patch一切顺利,最后运行root.sh也没有问题。
好了,开始创建数据库(dbca),发现不能启动图形界面,报如下错误:
[oracle@rhel5 ~]$ dbca
/opt/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

哎呀,还让不让人活呀,不想再折腾了,手工创建数据库!
[oracle@rhel5 9iR2]$ echo $ORACLE_SID
vic
[oracle@rhel5 9iR2]$ cd dbs
[oracle@rhel5 dbs]$ ls
initdw.ora  init.ora
[oracle@rhel5 dbs]$ pwd
/opt/oracle/product/9iR2/dbs
[oracle@rhel5 dbs]$ vi initvic.ora
[oracle@rhel5 dbs]$ more initvic.ora
db_name=vic
db_block_size=8192
db_create_file_dest='/opt/oracle/oradata/vic'
[oracle@rhel5 dbs]$ orapwd file=orapwvic password=oracle entries=5
[oracle@rhel5 dbs]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.8.0 - Production on Tue Oct 30 17:27:11 2012

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> create database;
create database
*
ERROR at line 1:
ORA-01034: ORACLE not available


SQL> startup nomount
ORA-01261: Parameter db_create_file_dest destination string cannot be translated
ORA-01262: Stat failed on a file destination directory
Linux Error: 2: No such file or directory
SQL> exit
Disconnected
[oracle@rhel5 dbs]$ mkdir -p /opt/oracle/oradata/vic
[oracle@rhel5 dbs]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.8.0 - Production on Tue Oct 30 17:27:54 2012

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.

Total System Global Area   97587796 bytes
Fixed Size                   451156 bytes
Variable Size              46137344 bytes
Database Buffers           50331648 bytes
Redo Buffers                 667648 bytes
SQL> create database;

Database created.

SQL>
以下省略。。。睡觉了。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lordcoohoo

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值