同样,安装后期会提示用户在所有节点上以root身份运行脚本root.sh,这时在RAC1运行是还要进行VIP配置。
/u01/app/oracle/product/10.1.0.3/oracle/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.1.0.3/oracle
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Adding entry to /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/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.
此时Oracle安装程序会进行VIP配置,需要选择网络接口和各个节点的虚拟地址
配置完成后会出现显示整个配置的结果:
同时需要在另一个节点RAC2上运行root.sh
/u01/app/oracle/product/10.1.0.3/oracle/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.1.0.3/oracle
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /var/opt/oracle/oratab file...
Adding entry to /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/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.
CRS resources are already configured
以上步骤完成后,整个Oracle 10g的安装就完成了。
下面我们还需要进行Oracle网络服务的配置,具体步骤如下:
netca
Oracle Net Services Configuration:
1, 在网络服务配置时选择”Cluster configuration”,如下图所示:
在此我们还可以来起动并验证一下刚刚创建的数据库
------------------------------------------------
oracle:RAC1>srvctl status database -d tree
Instance tree1 is running on node rac1
Instance tree2 is running on node rac2
srvctl status nodeapps -n RAC1
VIP is running on node: RAC1
GSD is running on node: RAC1
Listener is running on node: RAC1
ONS daemon is running on node: RAC1
srvctl status nodeapps -n RAC2
VIP is running on node: RAC2
GSD is running on node: RAC2
Listener is running on node: RAC2
ONS daemon is running on node: RAC2
srvctl stop database -d tree
srvctl status database -d tree
Instance tree1 is not running on node rac1
Instance tree2 is not running on node rac2
srvctl status nodeapps -n RAC1
VIP is running on node: RAC1
GSD is running on node: RAC1
Listener is running on node: RAC1
ONS daemon is running on node: RAC1
srvctl status nodeapps -n RAC2
VIP is running on node: RAC2
GSD is running on node: RAC2
Listener is running on node: RAC2
ONS daemon is running on node: RAC2
srvctl start database -d tree
srvctl status database -d tree
Instance tree1 is running on node rac1
Instance tree2 is running on node rac2
sqlplus /nolog
SQL*Plus: Release 10.1.0.3.0 - Production on Tue Jan 24 17:00:22 2006
Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 838860800 bytes
Fixed Size 781424 bytes
Variable Size 221254544 bytes
Database Buffers 616562688 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL> SELECT * FROM V$ACTIVE_INSTANCES;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
1 RAC1:tree1
2 RAC2:tree2
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
参考文献:
Oracle Real Application Clusters Installation and Configuration Guide 10g Release 1 (10.1)
for AIX-Based Systems, Apple Mac OS X, hp HP-UX, hp Tru64 UNIX, Linux, Solaris Operating System, and Windows Platforms Part No. B10766-08