--12.然后打开xmanager,进入/u01/Oracle/database进行安装
[root@RedHat database]# su - oracle
[oracle@redhat ~]$ cd /u01/oracle/database
[oracle@redhat database]$ export DISPLAY="192.168.39.178:0.0"
--上面这个必须,不然会报错没有这个连xclock都不能执行,如果用oracle执行这条语句还是不行的话最好用root执行一次
[oracle@redhat database]$ ./runInstaller //这里我只安装软件,不安装数据库实例,实例等会再安装
Starting Oracle Universal Installer...
--12.安装完后用root登录运行这两个脚本
[root@redhat ~]# /u01/oraInventory/orainstRoot.sh
Changing permissions of /u01/oraInventory to 770.
Changing groupname of /u01/oraInventory to oinstall.
The execution of the script is complete
[root@redhat ~]# /u01/oracle/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle
Enter the full pathname of the local bin directory: [/usr/local/bin]: y
Creating y directory...
Copying dbhome to y ...
Copying oraenv to y ...
Copying coraenv to y ...
Creating /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.
The following J2EE Applications have been deployed and are accessible at the URLs listed below.
iSQL*Plus URL:
http://redhat:5560/isqlplus
iSQL*Plus DBA URL:
http://redhat:5560/isqlplus/dba
--13.安装数据库
[oracle@redhat ~]$ export DISPLAY="192.168.39.178:0.0" --没有这个他会提示
[oracle@redhat ~]$ dbca
--14.升级到10.2.0.4
/*
同样上传文件,解压,export DISPLAY="192.168.39.178:0.0" 然后运行安装
注意安装的时候可能会遇到说正有进程在$ORACLE_HOME下运行,这时候重启系统再运行就是了!
最后的提示信息:
The iSQL*Plus URL is:
http://redhat:5560/isqlplus
The iSQL*Plus DBA URL is:
http://redhat:5560/isqlplus/dba
安装好后启动数据库可能还会报错 看下面:
*/
oracle@linux-l4nt:~> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jan 23 10:58:31 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1267044 bytes
Variable Size 130026140 bytes
Database Buffers 146800640 bytes
Redo Buffers 7118848 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
查看alert_orcl.log文件
Errors in file /opt/oracle/admin/orcl/udump/orcl_ora_8281.trc:
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Sat Jan 23 10:08:05 2010
Error 704 happened during db open, shutting down database
USER: terminating instance due to error 704
Instance terminated by USER, pid = 8281
ORA-1092 signalled during: ALTER DATABASE OPEN...
查看/opt/oracle/admin/orcl/udump/orcl_ora_8281.trc
KCRA: start recovery claims for 96 data blocks
*** 2010-01-23 10:08:04.520
KCRA: blocks processed = 96/96, claimed = 96, eliminated = 0
*** 2010-01-23 10:08:04.520
Recovery of Online Redo Log: Thread 1 Group 1 Seq 2 Reading mem 0
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 96/96 = 1.0
Max compares per lookup = 1
Avg compares per lookup = 1283/1287 = 1.0
----------------------------------------------
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
/*
原因:因为今天进行了数据库升级,数据字典的一些基表内容被修改了。
解决方法:执行$ORACLE_HOME/rdbms/admin/catupgrd.sql(如果报错,执行
@$ORACLE_HOME/rdbms/admin/catalog.sql 和@$ORACLE_HOME/rdbms/admin/catproc.sql)
处理过程:
*/
oracle@linux-l4nt:~> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jan 23 11:06:22 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup upgrade
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1267044 bytes
Variable Size 130026140 bytes
Database Buffers 146800640 bytes
Redo Buffers 7118848 bytes
Database mounted.
Database opened.
SQL>@ORACLE_HOME/rdbms/admin/catupgrd.sql
....
没有报错
SQL>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1267044 bytes
Variable Size 130026140 bytes
Database Buffers 146800640 bytes
Redo Buffers 7118848 bytes
Database mounted.
Database opened.
成功启动数据库。
--如果执行过程中有错误,完成后仍然无法正常启动,则这个脚本不可用,换其他两个脚本执行
SQL> startup upgrade
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1267044 bytes
Variable Size 130026140 bytes
Database Buffers 146800640 bytes
Redo Buffers 7118848 bytes
Database mounted.
Database opened.
SQL>@$ORACLE_HOME/rdbms/admin/catalog.sql
.....
SQL>@$ORACLE_HOME/rdbms/admin/catproc.sql
.....
SQL>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1267044 bytes
Variable Size 130026140 bytes
Database Buffers 146800640 bytes
Redo Buffers 7118848 bytes
Database mounted.
Database opened.
OK了,大功告成!