Oracle VM 模板 其实就是预打包、预配置的虚拟机。在于企业级客户的交流中,我常常用“简单,快速,不出错”来形容使用 Oracle VM 模板来部署应用。Oracle VM 模板为客户节约数天至数周的配置时间,可以真正帮助客户实现应用的快速部署和快速上线。Oracle 提供了一个小工具 Deploycluster 来实现在 Oracle VM 环境中快速部署 Oracle Database 模板。使用 Deploycluster 不但可以部署单实例 Oracle Database, 而且还可以部署多节点 Oracle RAC 环境。Oracle 11g 在RedHat Linux 5.8_x64平台的安装手册 http://www.linuxidc.com/Linux/2014-07/104745.htmLinux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htmOracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htmDebian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm使用 Oracle VM 模板快速部署 Oracle RAC 环境其实有两种部署方式:
- Production – Supported(提供官方支持): where the shared disk is configured as physical devices passed through to the guest Oracle VMs.
- Test – Unsupported(不提供官方支持): where the shared disk is configured as virtual devices
下面我就讲讲如何快速部署 Oracle RAC 环境,由于实验环境有限,我的部署方式介于两者之间:没有直接使用物理硬盘,但是用了两台 Oracle VM Server 来跑 RAC 实例,具体过程如下:1. 检查 Deploycluster 工具的软件必要条件:
[root@ovm199 ~]# python -V
Python 2.6.6[root@ovm199 ~]# java -version
java version “1.7.0_45″
OpenJDK Runtime Environment (rhel-2.4.3.3.0.1.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)[root@ovm199 ~]# rpm -qa | grep bc
…
bc-1.06.95-1.el6.x86_64
2. 登录 Oracle VM Manager 执行如下操作:
- 导入下载的 DBRAC 模板
- 修改导入的模板基本配置(CPU,内存和网络)
- 创建5个共享 ASM 虚拟磁盘
- 使用导入的模板一次克隆两个虚拟机
- 为两个虚拟机分别添加共享的5个 ASM 磁盘
3. 解压 Deploycluster 工具
[root@ovm199 ~]# unzip DBRACOVM-Deploycluster-tool.zip
4. 创建 netconfig.ini 文件
[root@ovm199 deploycluster]# cat netconfig.ini
# Node specific information
NODE1=racnode1
NODE1IP=192.168.1.231
NODE1PRIV=racnode1-priv
NODE1PRIVIP=10.10.10.231
NODE1VIP=racnode1-vip
NODE1VIPIP=192.168.1.233
NODE2=racnode2
NODE2IP=192.168.1.232
NODE2PRIV=racnode2-priv
NODE2PRIVIP=10.10.10.232
NODE2VIP=racnode2-vip
NODE2VIPIP=192.168.1.234# Common data
PUBADAP=eth0
PUBMASK=255.255.255.0
PUBGW=192.168.1.1
PRIVADAP=eth1
PRIVMASK=255.255.255.0
RACCLUSTERNAME=crs64bitR2
DOMAINNAME=localdomain # May be blank
DNSIP= # Starting from 2013 Templates allows multi value
# 11gR2 specific data
SCANNAME=racnode1-racnode2-scan
SCANIP=192.168.1.235
5. 运行 Deploycluster 工具
[root@ovm199 deploycluster]# ./deploycluster.py -u admin -p OracleVM326 -M racnode.0,racnode.1 -N netconfig.ini
Oracle DB/RAC OneCommand (v2.0.3) for Oracle VM – deploy cluster – (c) 2011-2013 Oracle Corporation
(com: 28700:v2.0.2, lib: 180072:v2.0.3, var: 1500:v2.0.3) – v2.6.6 – ovm199.example.com (x86_64)
Invoked as root at Wed Apr 16 15:01:16 2014 (size: 45500, mtime: Wed Jul 31 07:55:37 2013)
Using: ./deploycluster.py -u admin -p **** -M racnode.0,racnode.1 -N netconfig.iniINFO: Attempting to connect to Oracle VM Manager…INFO: Oracle VM Client (3.2.4.524) protocol (1.9) CONNECTED (tcp) to
Oracle VM Manager (3.2.6.726) protocol (1.9) IP (192.168.1.199) UUID (0004fb00000100003dd9272e9d3d3ba2)INFO: Inspecting /root/deploycluster/netconfig.ini for number of nodes defined…
INFO: Detected 2 nodes in: /root/deploycluster/netconfig.iniINFO: Located a total of (2) VMs;
2 VMs with a simple name of: ["racnode.0", "racnode.1"]INFO: Detected a RAC deployment…
INFO: Starting all (2) VMs…
INFO: VM with a simple name of “racnode.0″ is in a Stopped state, attempting to start it….OK.
INFO: VM with a simple name of “racnode.1″ is in a Stopped state, attempting to start it….OK.INFO: Verifying that all (2) VMs are in Running state and pass prerequisite checks…..
INFO: Detected that all (2) VMs specified on command line have (5) common shared disks between them (ASM_MIN_DISKS=5)
INFO: The (2) VMs passed basic sanity checks and in Running state, sending cluster details as follows:
netconfig.ini (Network setup): /root/deploycluster/netconfig.ini
buildcluster: yesINFO: Starting to send configuration details to all (2) VM(s)…..
INFO: Sending to VM with a simple name of “racnode.0″….
INFO: Sending to VM with a simple name of “racnode.1″……INFO: Configuration details sent to (2) VMs…
Check log (default location /u01/racovm/buildcluster.log) on build VM (racnode.0)…INFO: deploycluster.py completed successfully at 15:01:34 in 18.7 seconds (0h:00m:18s)
Logfile at: /root/deploycluster/deploycluster2.log
更多详情见请继续阅读下一页的精彩内容: http://www.linuxidc.com/Linux/2014-08/105607p2.htm
Oracle 实例创建脚本给Linux用户的11个高级MySQL数据库面试问题和答案相关资讯 Oracle RAC
- Oracle RAC 更换存储实验 (今 06:38)
- Oracle RAC客户端tnsnames.ora相关 (09/02/2015 19:31:57)
- Oracle 11gR2 RAC集群服务启动与关 (04/29/2015 10:27:54)
| - 11.2.04 Oracle RAC 目录中 (12/21/2015 15:10:42)
- 关于心跳网络引起的Oracle RAC的节 (06/04/2015 17:53:20)
- RedHat 6.4安装Oracle11.2.0.2 RAC (04/27/2015 19:26:34)
|
本文评论 查看全部评论 (0)