使用 Oracle VM 模板快速部署 Oracle RAC 環境

來源:互聯網
上載者:User

使用 Oracle VM 模板快速部署 Oracle RAC 環境

Oracle VM 模板 其實就是預打包、預配置的虛擬機器。在於企業級客戶的交流中,我常常用“簡單,快速,不出錯”來形容使用 Oracle VM 模板來部署應用。Oracle VM 模板為客戶節約數天至數周的配置時間,可以真正協助客戶實現應用的快速部署和快速上線。Oracle 提供了一個小工具 Deploycluster 來實現在 Oracle VM 環境中快速部署 Oracle Database 模板。使用 Deploycluster 不但可以部署單一實例 Oracle Database, 而且還可以部署多節點 Oracle RAC 環境。

Oracle 11g 在RedHat Linux 5.8_x64平台的安裝手冊

Linux-6-64下安裝Oracle 12C筆記

在CentOS 6.4下安裝Oracle 11gR2(x64)

Oracle 11gR2 在VMWare虛擬機器中安裝步驟

Debian 下 安裝 Oracle 11g XE R2

使用 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.ini

INFO: 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.ini

INFO: 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: yes

INFO: 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

更多詳情見請繼續閱讀下一頁的精彩內容:

  • 1
  • 2
  • 下一頁

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.