本节内容主要包括:
1:安装数据库软件
2:配置监听器
3:创建数据库
4:测试
在安装数据库软件之前,要先完成数据库集群件的安装;
数据库集群件的安装可参考:http://ylw6006.blog.51cto.com/470441/592816
一:安装数据库软件
1:上传数据库软件包至rac1节点然后进行解压和安装,只需要在节点1上安装即可
- [oracle@rac1 ~]$ gzip -d 10201_database_linux_x86_64.cpio.gz
- [oracle@rac1 ~]$ cpio -idmv < 10201_database_linux_x86_64.cpio
- [oracle@rac1 ~]$ cd database/
- [oracle@rac1 database]$ ./runInstaller
2:在两个节点分别运行相关脚本
- [root@rac1 ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh
- Running Oracle10 root.sh script...
- The following environment variables are set as:
- ORACLE_OWNER= oracle
- ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1
- 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 ...
- 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.
- [root@rac2 ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh
- Running Oracle10 root.sh script...
- The following environment variables are set as:
- ORACLE_OWNER= oracle
- ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1
- 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 ...
- 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.
二:配置listener,只需要在节点1配置即可
- [oracle@rac1 ~]$ netca
- 后台日志信息
- Oracle Net Services Configuration:
- Configuring Listener:LISTENER
- Default local naming configuration complete.
- rac1...
- rac2...
- Listener configuration complete.
- Oracle Net Services configuration successful. The exit code is 0
测试:
- [oracle@rac1 ~]$ lsnrctl status
- LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUN-2011 14:46:13
- Copyright (c) 1991, 2005, Oracle. All rights reserved.
- Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
- STATUS of the LISTENER
- ------------------------
- Alias LISTENER_RAC1
- Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
- Start Date 11-JUN-2011 14:39:24
- Uptime 0 days 0 hr. 6 min. 49 sec
- Trace Level off
- Security ON: Local OS Authentication
- SNMP OFF
- Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
- Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener_rac1.log
- Listening Endpoints Summary...
- (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.0.1)(PORT=1521)))
- (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.50.191)(PORT=1521)))
- Services Summary...
- Service "+ASM" has 1 instance(s).
- Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
- Service "+ASM_XPT" has 1 instance(s).
- Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
- Service "PLSExtProc" has 1 instance(s).
- Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
- The command completed successfully
三:创建数据库,在节点1创建即可
[oracle@rac1 ~]$ dbca
四:测试
- SQL> select instance_name,host_name,archiver,thread#,status from gv$instance;
- INSTANCE_NAME HOST_NAME ARCHIVER THREAD# STATUS
- -------------------- -------------------- ---------- ---------- ----------
- racdb1 rac1.766.com STARTED 1 OPEN
- racdb2 rac2.766.com STARTED 2 OPEN
本文转自斩月博客51CTO博客,原文链接http://blog.51cto.com/ylw6006/593865如需转载请自行联系原作者
ylw6006