开发者社区> 科技探索者> 正文

RAC安装之三 安装数据库软件和创建数据库

简介:
+关注继续查看

本节内容主要包括:
1:安装数据库软件
2:配置监听器
3:创建数据库
4:测试

在安装数据库软件之前,要先完成数据库集群件的安装;
数据库集群件的安装可参考:http://ylw6006.blog.51cto.com/470441/592816
 
一:安装数据库软件
1:上传数据库软件包至rac1节点然后进行解压和安装,只需要在节点1上安装即可


  1. [oracle@rac1 ~]$ gzip -d 10201_database_linux_x86_64.cpio.gz   
  2. [oracle@rac1 ~]$ cpio -idmv < 10201_database_linux_x86_64.cpio   
  3. [oracle@rac1 ~]$ cd database/  
  4. [oracle@rac1 database]$ ./runInstaller  

2:在两个节点分别运行相关脚本


  1. [root@rac1 ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh  
  2. Running Oracle10 root.sh script...  
  3.  
  4. The following environment variables are set as:  
  5.     ORACLE_OWNERoracle 
  6.     ORACLE_HOME=  /u01/app/oracle/product/10.2.0/db_1  
  7.  
  8. Enter the full pathname of the local bin directory: [/usr/local/bin]:   
  9.    Copying dbhome to /usr/local/bin ...  
  10.    Copying oraenv to /usr/local/bin ...  
  11.    Copying coraenv to /usr/local/bin ...  
  12.  
  13.  
  14. Creating /etc/oratab file...  
  15. Entries will be added to the /etc/oratab file as needed by  
  16. Database Configuration Assistant when a database is created  
  17. Finished running generic part of root.sh script.  
  18. Now product-specific root actions will be performed.  
  19.  
  20.  
  21. [root@rac2 ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh  
  22. Running Oracle10 root.sh script...  
  23.  
  24. The following environment variables are set as:  
  25.     ORACLE_OWNERoracle 
  26.     ORACLE_HOME=  /u01/app/oracle/product/10.2.0/db_1  
  27.  
  28. Enter the full pathname of the local bin directory: [/usr/local/bin]:   
  29.    Copying dbhome to /usr/local/bin ...  
  30.    Copying oraenv to /usr/local/bin ...  
  31.    Copying coraenv to /usr/local/bin ...  
  32.  
  33.  
  34. Creating /etc/oratab file...  
  35. Entries will be added to the /etc/oratab file as needed by  
  36. Database Configuration Assistant when a database is created  
  37. Finished running generic part of root.sh script.  
  38. Now product-specific root actions will be performed. 

二:配置listener,只需要在节点1配置即可


  1. [oracle@rac1 ~]$ netca  
  2. 后台日志信息  
  3. Oracle Net Services Configuration:  
  4. Configuring Listener:LISTENER  
  5. Default local naming configuration complete.  
  6. rac1...  
  7. rac2...  
  8. Listener configuration complete.  
  9. Oracle Net Services configuration successful. The exit code is 0 

 

 测试:


  1. [oracle@rac1 ~]$ lsnrctl status  
  2. LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUN-2011 14:46:13  
  3. Copyright (c) 1991, 2005, Oracle.  All rights reserved.  
  4. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))  
  5. STATUS of the LISTENER  
  6. ------------------------  
  7. Alias                     LISTENER_RAC1  
  8. Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production  
  9. Start Date                11-JUN-2011 14:39:24  
  10. Uptime                    0 days 0 hr. 6 min. 49 sec  
  11. Trace Level               off  
  12. Security                  ON: Local OS Authentication  
  13. SNMP                      OFF  
  14. Listener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora  
  15. Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener_rac1.log  
  16. Listening Endpoints Summary...  
  17.   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.0.1)(PORT=1521)))  
  18.   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.50.191)(PORT=1521)))  
  19. Services Summary...  
  20. Service "+ASM" has 1 instance(s).  
  21.   Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...  
  22. Service "+ASM_XPT" has 1 instance(s).  
  23.   Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...  
  24. Service "PLSExtProc" has 1 instance(s).  
  25.   Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...  
  26. The command completed successfully 

三:创建数据库,在节点1创建即可
[oracle@rac1 ~]$ dbca 

 

 

 

四:测试


  1. SQL> select instance_name,host_name,archiver,thread#,status from gv$instance;  
  2.  
  3. INSTANCE_NAME        HOST_NAME            ARCHIVER      THREAD# STATUS  
  4. -------------------- -------------------- ---------- ---------- ----------  
  5. racdb1               rac1.766.com         STARTED             1 OPEN  
  6. racdb2               rac2.766.com         STARTED             2 OPEN  

本文转自斩月博客51CTO博客,原文链接http://blog.51cto.com/ylw6006/593865如需转载请自行联系原作者


ylw6006

 

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
rac安装报错“ Checking swap space 0 MB available, 150 MB required. Failed”
rac安装报错“ Checking swap space 0 MB available, 150 MB required. Failed”
275 0
Rhel7安装RAC 11gR2时运行root.sh报错找不到ohas服务妙招
Rhel7安装RAC 11gR2时运行root.sh报错找不到ohas服务妙招
149 0
RHEL 7.6 安装 Oracle 18c RAC
RHEL 7.6 安装 Oracle 18c RAC第一部分 安装规划 虚拟环境 VirtualBox 6.0 OS 版本 Red Hat Enterprise Linux Server release 7.
1872 0
阿里专有云3.6.1版本云上rac安装节点驱逐问题
阿里专有云云上Oracle rac节点驱逐解决方案
2635 0
Cloud Control 13c 13.3安装(三) 监控 grid rac 状态
Cloud Control 13c 13.3 监控 grid rac 状态
2249 0
请参考rhel7 安装 oracle 18c rac(03 dbca 建立数据库)
rhel7 安装 oracle 18c rac(01 grid软件安装) dbca 建立数据库。
3065 0
RHEL7.X安装12.2RAC时root.sh错误CLSRSC-400的解决方案
问题现象: [root@ora12c ghome]# /opt/oracle/ghome/root.sh Performing root user operation. The following environment variables are set as:     ORACLE_OWNER= grid     ORACLE_HOME=  /opt/oracle/ghome 。
7109 0
+关注
科技探索者
文章
问答
视频
文章排行榜
最热
最新
相关电子书
更多
Oracle数据库笔记
立即下载
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
相关实验场景
更多