VMWareServer2+RHEL4+ASM+10gRAC
參考此文件請特別注意以下下幾點:
1、一定要關注命令執行位置和執行使用者,如無特殊說明rac1代表節點1,rac2代表節點2;root和oracle使用哪個使用者請關注命令列前的提示符。
2、本文件主要使用截圖方式記錄安裝過程,另外有必要會在截圖的上方寫下說明。
3、紅色注意部分的提示往往是Oracle RAC安裝成功與否的關鍵。
首先先準備出一臺RHEL4的虛擬機器
類似得,共要增加5塊硬碟,以備用
磁碟名稱 |
磁碟大小 |
磁碟路徑 |
File Options |
Disk Mode |
Vitual Device Mode |
ocr.vmdk |
0.3G |
[standard] ShareStorage/ocr.vmdk |
Allocate all disk space now |
Independent/Persistent |
SCSI1:0 |
votingdisk.vmdk |
0.3G |
[standard] ShareStorage/votingdisk.vmdk |
同上 |
同上 |
SCSI1:1 |
asmdisk1.vmdk |
4G |
[standard] ShareStorage/asmdisk1.vmdk |
同上 |
同上 |
SCSI1:2 |
asmdisk2.vmdk |
4G |
[standard] ShareStorage/asmdisk2.vmdk |
同上 |
同上 |
SCSI1:3 |
asmdisk3.vmdk |
4G |
[standard] ShareStorage/asmdisk3.vmdk |
同上 |
同上 |
SCSI1:4 |
VMnet2可以使用VMServer的工具進行新增
VMware-->VMware Server-->Manage Vitual Networks
[root@rac1 ~]# vi /etc/hosts
127.0.0.1 localhost
192.168.98.100 rac1
192.168.98.101 rac1-vip
10.10.10.10 rac1-priv
192.168.98.200 rac2
192.168.98.201 rac2-vip
10.10.10.20 rac2-priv
[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.
[root@rac1 ~]# mkdir -p /u01/app/oracle
[root@rac1 ~]# mkdir /u01/crs_1
[root@rac1 ~]# chown -R oracle:oinstall /u01
[root@rac1 ~]# ls -lt /u01
total 24
drwx------ 2 oracle oinstall 16384 Jul 11 2012 lost+found
drwxr-xr-x 2 oracle oinstall 4096 Jul 11 13:35 crs_1
drwxr-xr-x 3 oracle oinstall 4096 Jul 11 13:35 app
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ vi .bash_profile
export EDITOR=vi
export ORACLE_SID=prod1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=/u01/crs_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
umask 022
[oracle@rac1 ~]$ source .bash_profile
[oracle@rac1 ~]$ su -
Password:
[root@rac1 ~]# vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
[root@rac1 ~]# sysctl -p
[root@rac1 ~]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@rac1 ~]# vi /etc/pam.d/login
session required /lib/security/pam_limits.so
[root@rac1 ~]# vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
[root@rac1 ~]# vi /etc/rc.local
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
[root@rac1 ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1020 8193118+ 83 Linux
/dev/sda2 1021 1281 2096482+ 82 Linux swap
/dev/sda3 1282 2610 10675192+ 83 Linux
Disk /dev/sdb: 322 MB, 322122240 bytes
64 heads, 32 sectors/track, 307 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdc: 322 MB, 322122240 bytes
64 heads, 32 sectors/track, 307 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdd: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Disk /dev/sde: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdf: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
[root@rac1 ~]# fdisk /dev/sdb
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-307, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-307, default 307):
Using default value 307
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]# fdisk /dev/sdc
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-307, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-307, default 307):
Using default value 307
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]# fdisk /dev/sdd
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-522, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-522, default 522):
Using default value 522
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]# fdisk /dev/sde
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-522, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-522, default 522):
Using default value 522
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]# fdisk /dev/sdf
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-522, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-522, default 522):
Using default value 522
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]#10.10.10
New SMB password:
Retype new SMB password:
tdbsam_open: Converting version 0 database to version 3.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
Added user oracle.
[root@rac1 ~]# service smb start
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@rac1 ~]# smbpasswd -a oracle
New SMB password:
Retype new SMB password:
[root@rac1 oracle]# uname -a
Linux rac1 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux
[root@rac1 oracle]# cd /home/oracle/software
[root@rac1 software]# ls
10201_clusterware_linux32.zip
10201_database_linux32.zip
oracleasm-2.6.9-67.ELsmp-2.0.3-1.i686.rpm
oracleasmlib-2.0.4-1.el4.i386.rpm
oracleasm-support-2.1.4-1.el4.i386.rpm
[root@rac1 oracle]# cd /home/oracle/software
[root@rac1 software]# ls
10201_clusterware_linux32.zip
10201_database_linux32.zip
oracleasm-2.6.9-67.ELsmp-2.0.3-1.i686.rpm
oracleasmlib-2.0.4-1.el4.i386.rpm
oracleasm-support-2.1.4-1.el4.i386.rpm
[root@rac1 software]# rpm -ivh oracleasm*
warning: oracleasmlib-2.0.4-1.el4.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.9-67.ELsm########################################### [ 67%]
3:oracleasmlib ########################################### [100%]
[root@rac1 software]# rpm -qa|grep oracleasm
oracleasm-support-2.1.4-1.el4
oracleasm-2.6.9-67.ELsmp-2.0.3-1
oracleasmlib-2.0.4-1.el4
[root@rac1 software]# vi /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdc1
/dev/raw/raw3 /dev/sdd1
/dev/raw/raw4 /dev/sdf1
/dev/raw/raw5 /dev/sde1
[root@rac1 software]# vi /etc/udev/permissions.d/50-udev.permissions
# raw devices
ram*:root:disk:0660
#raw/*:root:disk:0660
raw/*:oracle:dba:0660
[root@rac1 software]# service rawdevices start
Assigning devices:
/dev/raw/raw1 --> /dev/sdb1
/dev/raw/raw1: bound to major 8, minor 17
/dev/raw/raw2 --> /dev/sdc1
/dev/raw/raw2: bound to major 8, minor 33
/dev/raw/raw3 --> /dev/sdd1
/dev/raw/raw3: bound to major 8, minor 49
/dev/raw/raw4 --> /dev/sdf1
/dev/raw/raw4: bound to major 8, minor 81
/dev/raw/raw5 --> /dev/sde1
/dev/raw/raw5: bound to major 8, minor 65
done
[root@rac1 software]# ls -l /dev/raw/*
crw-rw---- 1 oracle dba 162, 1 Jul 11 14:08 /dev/raw/raw1
crw-rw---- 1 oracle dba 162, 2 Jul 11 14:08 /dev/raw/raw2
crw-rw---- 1 oracle dba 162, 3 Jul 11 14:08 /dev/raw/raw3
crw-rw---- 1 oracle dba 162, 4 Jul 11 14:08 /dev/raw/raw4
crw-rw---- 1 oracle dba 162, 5 Jul 11 14:08 /dev/raw/raw5
編輯rac1虛擬機器啟動檔案(*.vmx)
disk.locking = "FALSE"
disklib.dataCacheMaxSize = "0"
disklib.dataCacheMaxReadAheadSize = "0"
disklib.dataCacheMinReadAheadSize = "0"
disklib.dataCachePageSize = "4096"
disklib.maxUnsyncedWrites = "0"
scsi1:0.deviceType = "disk"
scsi1:1.deviceType = "disk"
scsi1:2.deviceType = "disk"
scsi1:3.deviceType = "disk"
scsi1:4.deviceType = "disk"
編輯E:\Virtual Machines\rac2\rac1.vmx,把displayName改為rac2
displayName = "rac2"
開啟rac2節點,開啟時選擇 “I _copied it”
[root@rac1 ~]# vi /etc/sysconfig/network (rac2節點)
NETWORKING=yes
HOSTNAME=rac2
GATEWAY=192.168.0.1
[root@rac1 ~]# hostname rac2 (rac2節點)
[root@rac1 ~]# ifconfig (rac2節點)
eth0 Link encap:Ethernet HWaddr 00:0C:29:5A:55:0B
inet addr:192.168.98.200 Bcast:192.168.98.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe5a:550b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:144 errors:0 dropped:0 overruns:0 frame:0
TX packets:137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13991 (13.6 KiB) TX bytes:13855 (13.5 KiB)
Interrupt:193 Base address:0x2400
eth1 Link encap:Ethernet HWaddr 00:0C:29:5A:55:15
inet addr:10.10.10.20 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe5a:5515/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:276 (276.0 b) TX bytes:630 (630.0 b)
Interrupt:169 Base address:0x2480
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2136 errors:0 dropped:0 overruns:0 frame:0
TX packets:2136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3209328 (3.0 MiB) TX bytes:3209328 (3.0 MiB)
[root@rac1 ~]# su – oracle (rac2節點)
[oracle@rac2 ~]$ vi .bash_profile
export EDITOR=vi
export ORACLE_SID=prod2
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=/u01/crs_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
umask 022
[oracle@rac2 ~]$ source .bash_profile
[oracle@rac2 ~]$ su -
Password:
[root@rac2 ~]# service rawdevices start
Assigning devices:
/dev/raw/raw1 --> /dev/sdb1
/dev/raw/raw1: bound to major 8, minor 17
/dev/raw/raw2 --> /dev/sdc1
/dev/raw/raw2: bound to major 8, minor 33
/dev/raw/raw3 --> /dev/sdd1
/dev/raw/raw3: bound to major 8, minor 49
/dev/raw/raw4 --> /dev/sdf1
/dev/raw/raw4: bound to major 8, minor 81
/dev/raw/raw5 --> /dev/sde1
/dev/raw/raw5: bound to major 8, minor 65
Done
[root@rac2 ~]# ls -la /dev/raw/
total 0
drwxr-xr-x 2 root root 140 Jul 11 14:56 .
drwxr-xr-x 9 root root 6740 Jul 11 14:59 ..
crw-rw---- 1 oracle dba 162, 1 Jul 11 14:56 raw1
crw-rw---- 1 oracle dba 162, 2 Jul 11 14:56 raw2
crw-rw---- 1 oracle dba 162, 3 Jul 11 14:56 raw3
crw-rw---- 1 oracle dba 162, 4 Jul 11 14:56 raw4
crw-rw---- 1 oracle dba 162, 5 Jul 11 14:56 raw5
[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:
d4:1d:b3:cf:d0:00:50:f2:fe:d6:87:78:aa:77:86:72 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:
00:5b:4c:74:06:70:a4:da:84:ab:72:56:28:89:1e:24 oracle@rac1
[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:
c7:bc:78:d7:72:96:ca:e9:1f:05:32:36:29:86:a1:18 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:
05:31:b1:33:32:b1:54:a2:81:32:3f:79:6d:6b:bd:08 oracle@rac2
[oracle@rac1 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[oracle@rac1 ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@rac1 ~]$ ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'rac2 (192.168.0.40)' can't be established.
RSA key fingerprint is 68:93:04:b1:49:6e:2c:0e:cd:61:10:3b:41:1e:34:9e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.0.40' (RSA) to the list of known hosts.
oracle@rac2's password:
[oracle@rac1 ~]$ ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@rac2's password:
[oracle@rac1 ~]$ scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
oracle@rac2's password:
authorized_keys 100% 1644 1.6KB/s 00:00
[oracle@rac1 ~]$ ssh rac2 date
Wed Jul 11 15:44:53 CST 2012
[oracle@rac1 ~]$ ssh rac2-priv date
The authenticity of host 'rac2-priv (10.10.10.40)' can't be established.
RSA key fingerprint is 68:93:04:b1:49:6e:2c:0e:cd:61:10:3b:41:1e:34:9e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2-priv,10.10.10.40' (RSA) to the list of known hosts.
Wed Jul 11 15:45:00 CST 2012
[oracle@rac1 ~]$ ssh rac1 date
The authenticity of host 'rac1 (192.168.0.30)' can't be established.
RSA key fingerprint is 68:93:04:b1:49:6e:2c:0e:cd:61:10:3b:41:1e:34:9e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.0.30' (RSA) to the list of known hosts.
Wed Jul 11 15:45:34 CST 2012
[oracle@rac1 ~]$ ssh rac1-priv date
The authenticity of host 'rac1-priv (10.10.10.30)' can't be established.
RSA key fingerprint is 68:93:04:b1:49:6e:2c:0e:cd:61:10:3b:41:1e:34:9e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1-priv,10.10.10.30' (RSA) to the list of known hosts.
Wed Jul 11 15:47:02 CST 2012
[oracle@rac1 ~]$ ssh rac1 date
Wed Jul 11 15:47:23 CST 2012
[oracle@rac1 ~]$ ssh rac1-priv date
Wed Jul 11 15:47:28 CST 2012
[oracle@rac1 ~]$ ssh rac2 date
Wed Jul 11 15:47:07 CST 2012
[oracle@rac1 ~]$ ssh rac2-priv date
Wed Jul 11 15:47:10 CST 2012
[oracle@rac2 ~]$ ssh rac2 date
The authenticity of host 'rac2 (192.168.0.40)' can't be established.
RSA key fingerprint is 68:93:04:b1:49:6e:2c:0e:cd:61:10:3b:41:1e:34:9e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.0.40' (RSA) to the list of known hosts.
Wed Jul 11 15:47:28 CST 2012
[oracle@rac2 ~]$ ssh rac2-priv date
Wed Jul 11 15:47:34 CST 2012
[oracle@rac2 ~]$ ssh rac1 date
The authenticity of host 'rac1 (192.168.0.30)' can't be established.
RSA key fingerprint is 68:93:04:b1:49:6e:2c:0e:cd:61:10:3b:41:1e:34:9e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.0.30' (RSA) to the list of known hosts.
Wed Jul 11 15:48:04 CST 2012
[oracle@rac2 ~]$ ssh rac1-priv date
The authenticity of host 'rac1-priv (10.10.10.30)' can't be established.
RSA key fingerprint is 68:93:04:b1:49:6e:2c:0e:cd:61:10:3b:41:1e:34:9e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1-priv,10.10.10.30' (RSA) to the list of known hosts.
Wed Jul 11 15:48:10 CST 2012
[oracle@rac2 ~]$ ssh rac2 date
Wed Jul 11 15:47:58 CST 2012
[oracle@rac2 ~]$ ssh rac2-priv date
Wed Jul 11 15:48:02 CST 2012
[oracle@rac2 ~]$ ssh rac1 date
Wed Jul 11 15:48:30 CST 2012
[oracle@rac2 ~]$ ssh rac2-priv date
Wed Jul 11 15:48:09 CST 2012
[oracle@rac1 ~]$ su -
Password:
[root@rac1 ~]# service xinetd start
Starting xinetd:
[root@rac1 ~]# chkconfig time on
[root@rac1 ~]# chkconfig xinetd on
[root@rac1 ~]# chkconfig ntpd on
[root@rac1 ~]# service ntpd restart
Shutting down ntpd: [FAILED]
Starting ntpd: [ OK ]
[oracle@rac2 ~]$ su -
Password:
[root@rac2 ~]# crontab –e
0-59/1 * * * * /usr/bin/rdate -s 192.168.0.30 >/dev/null 2>&1
0-59/1 * * * * /usr/sbin/ntpdate 192.168.0.30>/dev/null 2>&1
[root@rac1 ~]# service oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac1 ~]# service oracleasm createdisk VOL1 /dev/sdd1
Marking disk "VOL1" as an ASM disk: [ OK ]
[root@rac1 ~]# service oracleasm createdisk VOL2 /dev/sde1
Marking disk "VOL2" as an ASM disk: [ OK ]
[root@rac1 ~]# service oracleasm createdisk VOL3 /dev/sdf1
Marking disk "VOL3" as an ASM disk: [ OK ]
[root@rac1 ~]# service oracleasm listdisks
VOL1
VOL2
VOL3
[root@rac2 ~]# service oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac2 ~]# service oracleasm listdisks
VOL1
VOL2
VOL3
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ cd software
[oracle@rac1 software]$ ls
10201_clusterware_linux32.zip
10201_database_linux32.zip
oracleasm-2.6.9-67.ELsmp-2.0.3-1.i686.rpm
oracleasmlib-2.0.4-1.el4.i386.rpm
oracleasm-support-2.1.4-1.el4.i386.rpm
[oracle@rac1 software]$ unzip 10201_clusterware_linux32.zip
… …
[oracle@rac1 software]$ unzip 10201_database_linux32.zip
……
[root@rac1 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory to 770.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@rac2 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory to 770.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@rac1 ~]# /u01/crs_1/root.sh
WARNING: directory '/u01' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01' is not owned by root
assigning default hostname rac1 for node 1.
assigning default hostname rac2 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/raw/raw2
Format of 1 voting devices complete.
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
rac1
CSS is inactive on these nodes.
rac2
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.
[root@rac2 ~]# /u01/crs_1/root.sh
WARNING: directory '/u01' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
assigning default hostname rac1 for node 1.
assigning default hostname rac2 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
clscfg: Arguments check out successfully.
NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
rac1
rac2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
The given interface(s), "eth0" is not public. Public interfaces should be used to configure virtual IPs.
注意:此步完成後,一定要確保eth0網路卡的閘道器能夠ping透過,如果ping不通的話,兩個節點的vip會頻繁的重啟並且會在兩個節點漂移不定,如果是虛擬機器環境的可以直接把eth0的閘道器設定為自己的ip地址
[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.
[oracle@rac2 ~]$ su -
Password:
[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.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26613085/viewspace-1063255/,如需轉載,請註明出處,否則將追究法律責任。