vmware + 裸设备 + crs + oracle10g RAC搭建步骤
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
vmware + 裸设备 + crs + oracle10g RAC搭建步骤(一):创建虚拟机
最近在本机上重新用vmware server 1.04 搭建了一套10G RAC系统,在搭建过程把步骤基本记录下来,希望对大家有帮助。
本部分主要讲述如何用vmware server创建一个虚拟服务器。
创建虚拟机
1、创建目录
G:\>mkdir vm\rac\rac1
G:\>mkdir vm\rac\rac2
G:\>mkdir vm\rac\sharedstorage
2、创建虚拟机
双击桌面上的VMware Server图标以启动应用程序:
1.按CTRL-N创建一个新的虚拟机。
2.新建虚拟机向导:单击Next。
3.选择适当的配置:
a.虚拟机配置:选择Custom。
4.选择客户操作系统:
a.客户操作系统:选择Linux。
b.版本:选择Red Hat Enterprise Linux 4。
5.命名虚拟机:
a.虚拟机名称:输入“rac1”。
b.位置:输入“G:\vm\rac\rac1”。
6.设置访问权限:
a.访问权限:选择Make this virtual machine private。
7.启动/关闭选项:
a.虚拟机帐户:选择User that powers on the virtual machine。
8.处理器配置:
a.处理器:选择一个处理器。
9.虚拟机内存:
a.内存:选择512MB。
10.网络类型:
a.网络连接:选择Use bridged networking。
11.选择I/O适配器类型:
a.I/O适配器类型:选择LSI Logic。
12.选择磁盘:
a.磁盘:选择Create a new virtual disk。
13.选择磁盘类型:
a.虚拟磁盘类型:选择SCSI (Recommended)。
14.指定磁盘容量:
a.磁盘容量:输入“8GB”。
b.取消选择Allocate all disk space now。
为了节省空间,您现在不必分配所
有磁盘空间。
15.指定磁盘文件:
a.磁盘文件:输入“rac1.vmdk”。
b.单击Finish。
16.VMware Server控制台:单击Edit virtual machine settings。
17.虚拟机设置:单击Add。
18.新增硬件向导:单击Next。
19.硬件类型:
a.硬件类型:选择Hard Disk。
20.选择磁盘:
a.磁盘:选择Create a new virtual disk。
21.选择磁盘类型:
a.虚拟磁盘类型:选择SCSI (Recommended)。
22.指定磁盘容量:
a.磁盘容量:输入“5GB”。
b.选择Allocate all disk space now。
c.选择分割成每个文件2G
23.指定磁盘文件:
a.磁盘文件:输入“G:\vm\rac\sharedstorage\share.vmdk”。
b.单击Advanced。
24.新增硬件向导:
a.虚拟设备节点:选择SCSI 1:0。
b.模式:选择Independent,针对所有共享磁盘选择Persistent。
c.单击Finish。
25.重复18-24步,再添加一个大小为6G的磁盘
26.VMware Server控制台:单击Edit virtual machine settings。
27.虚拟机设置:单击Add。
28.新增硬件向导:单击Next。
29.硬件类型:
a.硬件类型:以太网适配器。
b.网络类型:
c.单击Finish。
30.主机模式:与主机共享的专用网络
31.虚拟机设置:单击Add。
32.新增硬件向导:单击Next。
33.硬件类型:
a.硬件类型:以太网适配器。
b.网络类型:桥接
c.单击Finish。
安装rac每个主机最少需要2个网卡,用于公用网络和私有网络。
本文用到了3个网卡,这是因为为了操作方便,我会用SecureCRT连接vmware做操作,而我的测试环境是基于笔记本,无法固定IP,所以需要用其中两个网卡配置rac(配置rac中的网卡IP必须是固定的,否则后面的ssh验证信息可能会有问题),第三个网卡用自动获取IP的方式,以便可以在宿主机器上用其他工具直接连接虚拟机。
3、修改虚拟机文件
为了两个虚拟rac之间的磁盘共享,还需要配置虚拟机文件:
G:\vm\rac\rac1\Red HatEnterpriseLinux 4.vmx
加粗部分是需要添加的:
config.version = "8"
virtualHW.version = "4"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
memsize = "504"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "rac2.vmdk"
ide1:0.present = "TRUE"
ide1:0.fileName = "H:"
ide1:0.deviceType = "cdrom-raw"
floppy0.present = "FALSE"
Ethernet0.present = "TRUE"
displayName = "rac2"
guestOS = "rhel4"
priority.grabbed = "normal"
priority.ungrabbed = "normal"
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
scsi1.sharedBus = "virtual"
scsi1.present = "TRUE"
scsi1:0.present = "TRUE"
scsi1:0.fileName = "G:\vm\rac\sharedstorage\share.vmdk"
scsi1:0.mode = "independent-persistent"
scsi1:0.deviceType = "disk"
scsi1.virtualDev = "lsilogic"
ide1:0.autodetect = "FALSE"
scsi1:1.present = "TRUE"
scsi1:1.fileName = "G:\vm\rac\sharedstorage\share2.vmdk"
scsi1:1.mode = "independent-persistent"
scsi1:1.deviceType = "disk"
Ethernet1.present = "TRUE"
Ethernet1.connectionType = "hostonly"
scsi0:0.redo = ""
scsi1:0.redo = ""
ethernet0.addressType = "generated"
ethernet1.addressType = "generated"
uuid.location = "56 4d 64 7d 40 b8 e7 11-02 e7 2e 10 02 86 e2 a8"
uuid.bios = "56 4d 64 7d 40 b8 e7 11-02 e7 2e 10 02 86 e2 a8"
ethernet0.generatedAddress = "00:0c:29:86:e2:a8"
ethernet0.generatedAddressOffset = "0"
ethernet1.generatedAddress = "00:0c:29:86:e2:b2"
ethernet1.generatedAddressOffset = "10"
ide1:0.startConnected = "TRUE"
tools.syncTime = "TRUE"
workingDir = "."
Ethernet2.present = "TRUE"
ethernet2.addressType = "generated"
ethernet2.generatedAddress = "00:0c:29:86:e2:bc"
ethernet2.generatedAddressOffset = "20"
gui.exitOnCLIHLT = "TRUE"
scsi1:1.redo = ""
vmware + 裸设备 + crs + oracle10g RAC搭建步骤(二):安装linux
最近在本机上重新用vmware server 1.04 搭建了一套10G RAC系统,在搭建过程把步骤基本记录下来,希望对大家有帮助。
本部分主要讲述如何安装linux系统及如何搭建第二个节点。
安装Linux系统
1、安装第一个linux
安装过程不详细描述,注意在分区的时候选择手工分区,并且不要把第二个盘分区。
2、配置网络
1)修改主机名
执行命令:
Hostname rac1
修改/etc/sysconfig/network文件,修改为:
[root@rac1 ~]# more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=rac1
2)为网卡配置IP
用修改文件的方法配置IP相关信息:
[root@rac1 ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=200.200.200.1
NETMASK=255.255.255.0
TYPE=Ethernet
[root@rac1 ~]# more /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.10.10.1
NETMASK=255.255.255.0
TYPE=Ethernet
--以下这个网卡用于自动获取IP
[root@rac1 ~]# more /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
3)修改/etc/hosts文件
[root@rac1 ~]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
200.200.200.1 rac1
200.200.200.11 rac1-vip
10.10.10.1 rac1-priv
200.200.200.2 rac2
200.200.200.22 rac2-vip
10.10.10.2 rac2-priv
注意:127.0.0.1 localhost必须在/etc/hosts文件中存在,否则在后面安装rac过程可能会出错。
3、同步vmware的时间
安装rac时,两个节点的时间必须相差无几,否则在安装rac过程会报错:
"/bin/tar: ./inventory/Components21/oracle.ordim.server/10.2.0.1.0: time
stamp 2007-1-14 06:24:04 is 25 s in the future"
1)安装vmware tools
在VMware控制台上,以root用户身份登录。
1.单击VM,然后选择Install VMware Tools。
2. rac1—虚拟机:单击Install。
3.双击桌面上的VMware Tools图标。
4. cdrom:双击VMwareTools-1.0.1-29996.i386.rpm。
5.完成系统准备:单击Continue。
6.打开一个终端并执行vmware-config-tools.pl。
输入所需的显示大小:2 800*600
2)与主机同步时间
要确保成功安装Oracle RAC,虚拟机上的时间必须与主机上的时间同步。
执行下面的步骤,以root用户身份同步时间。
1.执行“vmware-toolbox”以显示VMware Tools Properties窗口。
在Options选项卡下,
选择Time synchronization between the virtual machine and the host operating system。
您应该发现tools.syncTime = "TRUE"参数已经追加到虚拟机配置文件
G:\vm\rac\rac1\rac1.vmx中。
2.编辑/boot/grub/grub.conf,并将选项“clock=pit nosmp noapic nolapic”添加到读
取内核/boot/的那一行。
修改后的文件内容如下所示:
[root@rac1 ~]# more /boot/grub/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-42.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/ rhgb quiet clock=pit
nosmp noapic nolapic
initrd /initrd-2.6.9-42.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.6.9-42.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.EL ro root=LABEL=/ rhgb quiet clock=pit nosmp
noapic nolapic
initrd /initrd-2.6.9-42.EL.img
1、创建第二个虚拟机
1)在rac1上,以root用户身份执行
# shutdown –h now
2)在主机系统上,将rac1文件夹中的所有文件复制到rac2。
G:\>copy G:\vm\rac\rac1 G:\vm\rac\rac2
3)在VMware Server控制台上,按CTRL-O打开第二个虚拟机G:\rac\rac2\Red Hat Enterprise Linux 4.vmx。
4)VMware Server控制台:
5)将虚拟机名称从rac1重命名为rac2。
右键单击您刚才打开的新rac1选项卡,然后选择Settings。
选择Options选项卡。
虚拟机名称:输入“rac2”。
6)单击Start this virtual machine启动rac2,保留rac1为电源关闭状态。
7)启动rac2,选择Create a new identifier。
2、配置第二个虚拟机的网络
1)修改主机名
执行命令:
hostname rac2
修改/etc/sysconfig/network文件,修改为:
[root@rac1 ~]# more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=rac2
2)为两个网卡配置IP
用修改文件的方法配置IP相关信息:
[root@rac1 ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0
EVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=200.200.200.2
NETMASK=255.255.255.0
TYPE=Ethernet
[root@rac1 ~]# more /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.10.10.2
NETMASK=255.255.255.0
TYPE=Ethernet
--第三块网卡用于自动获取IP
[root@rac2 ~]# more /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
3)与rac1节点同步数据
rdate -s rac1
把这个命令做成脚本,每分钟执行一次。
这样虽然不一定能保证所有节点的时间和host一样,但至少可以保证两个节点间的时间相差无几。
vmware + 裸设备 + crs + oracle10g RAC搭建步骤(三):安装RAC的准备工作
最近在本机上重新用vmware server 1.04 搭建了一套10G RAC系统,在搭建过程把步骤基本记录下来,希望对大家有帮助。
本部分主要讲述安装RAC要做的一些准备工作。
RAC安装准备工作
一、创建用户组和用户
1、在rac1创建用户组和用户
创建组
[root@rac1 ~]# groupadd oinstall
[root@rac1 ~]# groupadd dba
创建用户
[root@rac1 ~]# useradd -u 200 -g oinstall -G dba oracle
修改口令
[root@rac1 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
验证nobody用户是否存在
[root@rac1 ~]# id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)
如果nobody用户不存在,需要创建。
2、在rac2上创建相同的组和用户
Rac中,所有节点的oracle相关组和用户必须保持一致,包括名称、ID、密码。
在rac1执行id –a oracle,把oracle的相关信息打印出来:
[root@rac1 ~]# id -a oracle
uid=200(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
根据这个信息,在rac2上创建相同的组和用户:
[root@rac2 ~]# groupadd -g 500 oinstall
[root@rac2 ~]# groupadd -g 501 dba
[root@rac2 ~]# useradd -u 200 -g oinstall -G dba oracle
[root@rac2 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@rac2 ~]# id -a oracle
uid=200(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
二、在所有节点间配置ssh
在安装rac的多个步骤都需要从一个节点拷贝文件到其他节点中,这要求各个节点间互相访问不需要输入密码,否则安装就会失败。
这一步骤就是要配置ssh,使得rac的各个节点间不需要密码就可以互相访问。
以下步骤要求在oracle用户下执行:
在所有节点生成RSA和DSA Keys
过程需要回车几次。
Rac1中执行步骤如下:
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ mkdir ~/.ssh
[oracle@rac1 ~]$ chmod 700 ~/.ssh
[oracle@rac1 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
f3:df:90:e7:a7:47:7b:47:52:b1:f0:09:07:39:1b:c7 oracle@rac1
[oracle@rac1 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
8d:57:66:6c:77:9b:2a:1a:60:4e:18:6c:43:f3:15:3d oracle@rac1
在rac2中执行如下:
[root@rac2 ~]# su - oracle
[oracle@rac2 ~]$ mkdir ~/.ssh
[oracle@rac2 ~]$ chmod 700 ~/.ssh
[oracle@rac2 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
c8:93:83:8e:1f:51:0c:76:e7:42:75:a9:b0:12:04:f0 oracle@rac2
[oracle@rac2 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
e1:56:2f:f8:22:df:af:b3:f9:94:e3:15:dc:17:30:5foracle@rac2
添加密钥信息到验证文件中
这一系列步骤只需要在其中一个节点执行就可以了(这里选择rac1):
首先生成一个验证文件(ssh登录时会读取这个文件的信息),用来存储各个密钥信息:bash-3.00$ touch ~/.ssh/authorized_keys
把各个节点的密钥信息都放在上一步新建的验证文件中:
[oracle@rac1 ~]$ cd ~/.ssh
[oracle@rac1 .ssh]$ ssh rac1 cat ~/.ssh/id_rsa.pub >> authorized_keys
The authenticity of host 'rac1 (192.168.1.111)' can't be established.
RSA key fingerprint is e6:b8:99:04:5c:2a:42:a4:6b:18:6d:5d:69:59:b2:2e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.1.111' (RSA) to the list of known hosts.
oracle@rac1's password:
[oracle@rac1 .ssh]$ ssh rac2 cat ~/.ssh/id_rsa.pub >> authorized_keys
The authenticity of host 'rac2 (192.168.1.222)' can't be established.
RSA key fingerprint is e6:b8:99:04:5c:2a:42:a4:6b:18:6d:5d:69:59:b2:2e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.1.222' (RSA) to the list of known hosts.
oracle@rac2's password:
[oracle@rac1 .ssh]$ ssh rac1 cat ~/.ssh/id_dsa.pub >> authorized_keys
[oracle@rac1 .ssh]$ ssh rac2 cat ~/.ssh/id_dsa.pub >> authorized_keys
oracle@rac2's password:
在rac1把存储公钥信息的验证文件传送到rac2上
[oracle@rac1 .ssh]$ pwd
/home/oracle/.ssh
[oracle@rac1 .ssh]$ scp authorized_keys rac2:`pwd`
oracle@rac2's password:
authorized_keys
100% 1644 1.6KB/s 00:00
设置验证文件的权限
在每一个节点执行:
bash-3.00$ chmod 600 ~/.ssh/authorized_keys
启用用户一致性
在你要运行OUI的节点以oracle用户运行(这里选择rac1):
[oracle@rac1 .ssh]$ exec /usr/bin/ssh-agent $SHELL
[oracle@rac1 .ssh]$ ssh-add
Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)
Identity added: /home/oracle/.ssh/id_dsa (/home/oracle/.ssh/id_dsa)
验证ssh配置是否正确
以oracle用户在所有节点分别执行:
ssh rac1 date
ssh rac2 date
ssh rac1-priv date
ssh rac2-priv date
如果不需要输入密码就可以输出时间,说明ssh验证配置成功。
必须把以上命令在两个节点都运行,每一个命令在第一次执行的时候需要输入yes。
如果不运行这些命令,即使ssh验证已经配好,安装clusterware的时候也会出现错误:The specified nodes are not clusterable
因为,配好ssh后,还需要在第一次访问时输入yes,才算是真正的无障碍访问其他服务器。
验证网络是否满足安装rac要求:
[oracle@rac1 cluvfy]$ ./runcluvfy.sh comp nodecon -n rac1,rac2 -verbose
Verifying node connectivity
Checking node connectivity...
Interface information for node "rac2"
Interface Name IP Address Subnet
------------------------------ ------------------------------ ----------------
eth0 200.200.200.2 200.200.200.0
eth1 10.10.10.2 10.10.10.0
eth2 192.168.1.104 192.168.1.0
Interface information for node "rac1"
Interface Name IP Address Subnet
------------------------------ ------------------------------ ----------------
eth0 200.200.200.1 200.200.200.0
eth1 10.10.10.1 10.10.10.0
eth2 192.168.1.105 192.168.1.0
Check: Node connectivity of subnet "200.200.200.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
rac2:eth0 rac1:eth0 yes
Result: Node connectivity check passed for subnet "200.200.200.0" with node(s) rac2,rac1.
Check: Node connectivity of subnet "10.10.10.0"
vmware + 裸设备 + crs + oracle10g RAC搭建步骤(四):正式安装RAC
最近在本机上重新用vmware server 1.04 搭建了一套10G RAC系统,在搭建过程把步骤基本记录下来,希望对大家有帮助。
本部分主要讲述如何安装CRS、数据库软件及创建数据库。
正式安装RAC
一、安装clusterware
1、验证系统是否满足安装clusterware要求
[oracle@rac1 cluvfy]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -verbose
Performing pre-checks for cluster services setup
Checking node reachability...
Check: Node reachability from node "rac1"
Destination Node Reachable?
------------------------------------ ------------------------
rac2 yes
rac1 yes
Result: Node reachability check passed from node "rac1".
Checking user equivalence...
Check: User equivalence for user "oracle"
Node Name Comment
------------------------------------ ------------------------
rac2 passed
rac1 passed
Result: User equivalence check passed for user "oracle".
Checking administrative privileges...
Check: Existence of user "oracle"
Node Name User Exists Comment
------------ ------------------------ ------------------------
rac2 yes passed
rac1 yes passed
Result: User existence check passed for "oracle".
Check: Existence of group "oinstall"
Node Name Status Group ID
------------ ------------------------ ------------------------
rac2 exists 500
rac1 exists 500
Result: Group existence check passed for "oinstall".
Check: Membership of user "oracle" in group "oinstall" [as Primary]
Node Name User Exists Group Exists User in Group Primary Comment ---------------- ------------ ------------ ------------ ------------ ------------
rac2 yes yes yes yes passed rac1 yes yes yes yes passed Result: Membership check for user "oracle" in group "oinstall" [as Primary] passed.
Administrative privileges check passed.
Checking node connectivity...
Interface information for node "rac2"
Interface Name IP Address Subnet
------------------------------ ------------------------------ ----------------
eth0 200.200.200.2 200.200.200.0 eth1 10.10.10.2 10.10.10.0
eth2 172.25.0.82 172.25.0.0
Interface information for node "rac1"
Interface Name IP Address Subnet
------------------------------ ------------------------------ ----------------
eth0 200.200.200.1 200.200.200.0 eth1 10.10.10.1 10.10.10.0
eth2 172.25.0.81 172.25.0.0
Check: Node connectivity of subnet "200.200.200.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
rac2:eth0 rac1:eth0 yes
Result: Node connectivity check passed for subnet "200.200.200.0" with node(s) rac2,rac1.
Check: Node connectivity of subnet "10.10.10.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
rac2:eth1 rac1:eth1 yes
Result: Node connectivity check passed for subnet "10.10.10.0" with node(s) rac2,rac1.
Check: Node connectivity of subnet "172.25.0.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
rac2:eth2 rac1:eth2 yes
Result: Node connectivity check passed for subnet "172.25.0.0" with node(s) rac2,rac1.
Suitable interfaces for VIP on subnet "200.200.200.0":
rac2 eth0:200.200.200.2
rac1 eth0:200.200.200.1
Suitable interfaces for the private interconnect on subnet "10.10.10.0":
rac2 eth1:10.10.10.2
rac1 eth1:10.10.10.1
Suitable interfaces for the private interconnect on subnet "172.25.0.0":
rac2 eth2:172.25.0.82
rac1 eth2:172.25.0.81
Result: Node connectivity check passed.
Checking system requirements for 'crs'...
Check: Total memory
Node Name Available Required Comment ------------ ------------------------ ------------------------ ----------
rac2 494.85MB (506728KB) 512MB (524288KB) failed rac1 494.85MB (506728KB) 512MB (524288KB) failed Result: Total memory check failed.
Check: Free disk space in "/tmp" dir
Node Name Available Required Comment ------------ ------------------------ ------------------------ ----------
rac2 2.89GB (3027148KB) 400MB (409600KB) passed rac1 2.77GB (2906888KB) 400MB (409600KB) passed Result: Free disk space check passed.
Check: Swap space
Node Name Available Required Comment ------------ ------------------------ ------------------------ ----------
rac2 1.46GB (1534196KB) 1GB (1048576KB) passed rac1 1.46GB (1534196KB) 1GB (1048576KB) passed Result: Swap space check passed.
Check: System architecture
Node Name Available Required Comment ------------ ------------------------ ------------------------ ----------
rac2 i686 i686 passed rac1 i686 i686 passed Result: System architecture check passed.
Check: Kernel version
Node Name Available Required Comment ------------ ------------------------ ------------------------ ----------
rac2 2.6.9-42.ELsmp 2.4.21-15EL passed
rac1 2.6.9-42.ELsmp 2.4.21-15EL passed Result: Kernel version check passed.
Check: Package existence for "make-3.79"
Node Name Status Comment ------------------------------ ------------------------------ ----------------
rac2 make-3.80-6.EL4 passed
rac1 make-3.80-6.EL4 passed Result: Package existence check passed for "make-3.79".
Check: Package existence for "binutils-2.14"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
rac2 binutils-2.15.92.0.2-21 passed
rac1 binutils-2.15.92.0.2-21 passed
Result: Package existence check passed for "binutils-2.14".
Check: Package existence for "gcc-3.2"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
rac2 gcc-3.4.6-3 passed
rac1 gcc-3.4.6-3 passed
Result: Package existence check passed for "gcc-3.2".
Check: Package existence for "glibc-2.3.2-95.27"
vmware + 裸设备 + crs + oracle10g RAC搭建步骤(五):升级数据库
最近在本机上重新用vmware server 1.04 搭建了一套10G RAC系统,在搭建过程把步骤基本记录下来,希望对大家有帮助。
本部分主要讲述如何升级RAC数据库
升级数据库
一般情况下,最好在创建数据库前升级软件会省去不少麻烦,我这里为了测试,选择先创建数据库再升级。
1、如果安装了管理器和isqlplus执行如下命令停止:
emctl stop dbconsole
isqlplusctl stop
2、停止服务和实例
以oracle用户在其中一个节点执行
[oracle@rac1 ~]$ srvctl stop service -d rac
[oracle@rac1 ~]$ srvctl stop instance -d rac -i rac1,rac2
3、停止nodeapps
两个节点以root分别执行:
节点1:
[root@rac1 ~]# cd /opt/oracle/product/10.2/crs/bin/
[root@rac1 bin]# ./srvctl stop nodeapps -n rac1
节点2:
[root@rac1 ~]# cd /opt/oracle/product/10.2/crs/bin/
[root@rac1 bin]# ./srvctl stop nodeapps -n rac2
4、停止crs
在所有节点以root分别执行:
[root@rac1 bin]# ./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
5、升级数据库软件
必须在安装oracle软件的节点打运行补丁更新程序。
[root@rac1 ~]# export DISPLAY=172.25.8.131:1.0
[root@rac1 ~]# xhost +
access control disabled, clients can connect from any host
[root@rac1 ~]#
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ cd /soft/Disk1/
[oracle@rac1 Disk1]$ ls
10203_buglist.htm install patch_note.htm response runInstaller stage
[oracle@rac1 Disk1]$ ./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4,
UnitedLinux-1.0, asianux-1 or asianux-2
Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-01-16_06-09-15PM.
Please wait ...[oracle@rac1 Disk1]$ Oracle Universal Installer, Version10.2.0.3.0 Production Copyright (C) 1999, 2006, Oracle. All rights reserved.
在弹出的界面下一步,选择OraDb10g_home1
下一步,默认是选择了所有节点
下一步,开始升级
最后在所有节点以root执行脚本:
[root@rac1 bin]# /opt/oracle/product/10.2/database/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /opt/oracle/product/10.2/database
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...
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.
至此,数据库软件部分升级完成。
1)升级数据库
数据库升级可以用dbua,也可以手工升级。
我在这里选择手工升级的方式。
1、启动所有节点的的crs及监听等资源
[root@rac1 bin]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.
[root@rac2 bin]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.
1、在节点1修改参数
SQL> STARTUP NOMOUNT
SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='150M' SCOPE=spfile;
System altered.
SQL> ALTER SYSTEM SET JAVA_POOL_SIZE='150M' SCOPE=spfile;
System altered.
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;
System altered.
保证SHARED_POOL_SIZE和JAVA_POOL_SIZE不小于150m。
因为数据文件是共享的,所以升级的时候只需要在其中一个节点升级就行了,所以要把CLUSTER_DATABASE设成FALSE。
2、执行更新脚本
SQL> STARTUP UPGRADE
SQL> SPOOL patch.log
SQL> @?/rdbms/admin/catupgrd.sql
SQL> SPOOL OFF
检查日志看有没有错误,如果没有错误,则重启数据库:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 469762048 bytes
Fixed Size 1262428 bytes
Variable Size 419433636 bytes
Database Buffers 46137344 bytes
Redo Buffers 2928640 bytes
Database mounted.
Database opened.
3、编译无效对象
SQL> @?/rdbms/admin/utlrp.sql
4、修改参数
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;
System altered.
重启数据库,升级完成。