[转帖]在vmware上安装oracle 10g RAC(三)_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 4043 | 回复: 0   主题: [转帖]在vmware上安装oracle 10g RAC(三)        下一篇 
kim
注册用户
等级:中校
经验:1729
发帖:222
精华:0
注册:2011-7-21
状态:离线
发送短消息息给kim 加好友    发送短消息息给kim 发消息
发表于: IP:您无权察看 2011-8-1 11:02:43 | [全部帖] [楼主帖] 楼主

Install the Database Software and Create an ASM Instance
Start the RAC1 and RAC2 virtual machines, login to RAC1 as the oracle user and start the Oracle installer.

./runInstaller

On the "Welcome" screen, click the "Next" button.


北京联动北方科技有限公司

Select the "Enterprise Edition" option and click the "Next" button.


北京联动北方科技有限公司

Enter the name and path for the Oracle Home and click the "Next" button.


北京联动北方科技有限公司

Select the "Cluster Install" option and make sure both RAC nodes are selected, the click the "Next" button.


北京联动北方科技有限公司

Wait while the prerequisite checks are done. If you have any failures correct them and retry the tests before clicking the "Next" button.


北京联动北方科技有限公司

You can choose to ignore the warnings from the prerequisite checks and click the "Next" button. If you do, you will also need to ignore the subsequent warning message by clicking the "Yes" button.


北京联动北方科技有限公司

Select the "Configure Automatic Storage Management (ASM)" option, enter the SYS password for the ASM instance, then click the "Next" button.


北京联动北方科技有限公司

Select the "External" redundancy option (no mirroring), select all three raw disks (raw3, raw4 and raw5), then click the "Next" button.


北京联动北方科技有限公司

On the "Summary" screen, click the "Install" button to continue.


北京联动北方科技有限公司

Wait while the database software installs.


北京联动北方科技有限公司

Once the installation is complete, wait while the configuration assistants run.


北京联动北方科技有限公司

Execute the "root.sh" scripts on both nodes, as instructed on the "Execute Configuration scripts" screen, then click the "OK" button.


北京联动北方科技有限公司

When the installation is complete, click the "Exit" button to leave the installer.


北京联动北方科技有限公司

It's a good idea to take a snapshot of the virtual machines, so you can repeat the following stages if you run into any problems. To do this, shutdown both virtual machines and issue the following commands.

# cd /u01/VM
# tar -cvf RAC-PostASM.tar RAC1 RAC2 shared
# gzip RAC-PostASM.tar

The database software installation and ASM creation step is now complete.
Create a Database using the DBCA
Start the RAC1 and RAC2 virtual machines, login to RAC1 as the oracle user and start the Database Configuration Assistant.

dbca

On the "Welcome" screen, select the "Oracle Real Application Clusters database" option and click the "Next" button.


北京联动北方科技有限公司

Select the "Create a Database" option and click the "Next" button.


北京联动北方科技有限公司

Highlight both RAC nodes and click the "Next" button.


北京联动北方科技有限公司

Select the "Custom Database" option and click the "Next" button.


北京联动北方科技有限公司

Enter the values "RAC.WORLD" and "RAC" for the Global Database Name and SID Prefix respectively, then click the "Next" button.


北京联动北方科技有限公司

Accept the management options by clicking the "Next" button. If you are attempting the installation on a server with limited memory, you may prefer not to configure Enterprise Manager at this time.


北京联动北方科技有限公司

Enter database passwords then click the "Next" button.


北京联动北方科技有限公司

Select the "Automatic Storage Management (ASM)" option, then click the "Next" button.


北京联动北方科技有限公司

Select the "DATA" disk group, then click the "Next" button.


北京联动北方科技有限公司

Accept the "Use Oracle-Managed Files" database location by the "Next" button.


北京联动北方科技有限公司

Check both the "Specify Flash Recovery Area" and "Enable Archiving" options. Enter "+DATA" as the Flash Recovery Area, then click the "Next" button.


北京联动北方科技有限公司

Uncheck all but the "Enterprise Manager Repository" option, then click the "Standard Database Components..." button.


北京联动北方科技有限公司

Uncheck all but the "Oracle JVM" option, then click the "OK" button, followed by the "Next" button on the previous screen. If you are attempting the installation on a server with limited memory, you may prefer not to install the JVM at this time.


北京联动北方科技有限公司

Accept the current database services configuration by clicking the "Next" button.


北京联动北方科技有限公司

Select the "Custom" memory management option and accept the default settings by clicking the "Next" button.


北京联动北方科技有限公司

Accept the database storage settings by clicking the "Next" button.


北京联动北方科技有限公司

Accept the database creation options by clicking the "Finish" button.


北京联动北方科技有限公司

Accept the summary information by clicking the "OK" button.


北京联动北方科技有限公司

Wait while the database is created.


北京联动北方科技有限公司

Once the database creation is complete you are presented with the following screen. Make a note of the information on the screen and click the "Exit" button.


北京联动北方科技有限公司

The RAC database creation is now complete.
TNS Configuration
Once the installation is complete, the "$ORACLE_HOME/network/admin/listener.ora" file on each RAC node will contain entries similar to the following.

LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.localdomain)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.101)(PORT = 1521)(IP = FIRST))
)
)

SID_LIST_LISTENER_RAC1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)

The "$ORACLE_HOME/network/admin/tnsnames.ora" file on each RAC node will contain entries similar to the following.

RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.localdomain)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.localdomain)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.WORLD)
)
)

LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.localdomain)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.localdomain)(PORT = 1521))
)

RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.WORLD)
(INSTANCE_NAME = RAC2)
)
)

RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.WORLD)
(INSTANCE_NAME = RAC1)
)
)

This configuration allows direct connections to specific instance, or using a load balanced connection to the main service.

$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 18 12:27:11 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> CONN sys/password@rac1 AS SYSDBA
Connected.
SQL> SELECT instance_name, host_name FROM v$instance;

INSTANCE_NAME HOST_NAME
---------------- ----------------------------------------------------------------
RAC1 rac1.localdomain

SQL> CONN sys/password@rac2 AS SYSDBA
Connected.
SQL> SELECT instance_name, host_name FROM v$instance;

INSTANCE_NAME HOST_NAME
---------------- ----------------------------------------------------------------
RAC2 rac2.localdomain

SQL> CONN sys/password@rac AS SYSDBA
Connected.
SQL> SELECT instance_name, host_name FROM v$instance;

INSTANCE_NAME HOST_NAME
---------------- ----------------------------------------------------------------
RAC1 rac1.localdomain

SQL>

Check the Status of the RAC
There are several ways to check the status of the RAC. The srvctl utility shows the current configuration and status of the RAC database.

$ srvctl config database -d RAC
rac1 RAC1 /u01/app/oracle/product/10.2.0/db_1
rac2 RAC2 /u01/app/oracle/product/10.2.0/db_1
$

$ srvctl status database -d RAC
Instance RAC1 is running on node rac1
Instance RAC2 is running on node rac2
$

The V$ACTIVE_INSTANCES view can also display the current status of the instances.

$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 18 12:15:15 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> SELECT * FROM v$active_instances;

INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
1 rac1.localdomain:RAC1
2 rac2.localdomain:RAC2




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论