作者 阿九【轉載時請務必以超鏈接形式標明文章原始出處和作者信息】
VMware上安裝RH4AS+Oracle10g RAC+ASM
QQ:47538607 郵箱:[email protected]
一、安裝環境
1.1、目錄規劃
節點一:D:\Vmware\RH_RAC1
節點二:D:\Vmware\RH_RAC2
共享存儲:D:\Vmware\share_driver
1.2、網絡規劃:
節點 |
接口 |
類型 |
IP地址 |
子網掩碼 |
rac1 |
rac1 |
公共 |
172.16.1.163 |
255.255.0.0 |
rac1 |
rac1-vip |
虛擬 |
172.16.1.63 |
255.255.0.0 |
rac1 |
rac1-priv |
專用 |
192.168.1.163 |
255.255.0.0 |
rac2 |
rac2 |
公共 |
172.16.1.164 |
255.255.0.0 |
rac2 |
rac2-vip |
虛擬 |
172.16.1.64 |
255.255.0.0 |
rac2 |
rac2-priv |
專用 |
192.168.1.164 |
255.255.0.0 |
1.3、存儲規劃
文件 |
大小 |
存儲類型 |
Solaris10 |
6GB |
Linux |
Oracle Cluster |
2GB |
Linux |
Oracle Database |
4GB |
ASM |
Oracle CRS ocr |
100MB |
RAW |
Oracle CRS voting |
20MB |
RAW |
1.4、所需軟件:
1、Vmware workstation 7.0
2、Oracle 10g clusterware for linux x86 32bit
3、Oracle10g database for linux x86 32bit
4、Oracle ASM包:oracleasm-2.6.9-78.ELsmp-2.0.5-1.el4.i686.rpm
oracleasm-support-2.1.3-1.el4.i386.rpm
二、配置Vmware虛擬機並安裝系統
2.1這裏指定的是操作系統用戶名和密碼
2.2選擇虛擬機文件目錄
2.3指定內存大小
2.4指定網卡與主機連接模式。
這裏指定爲host-only,也可根據自己具體情況選擇。
2.5指定磁盤控制器類型,選擇默認。
2.6指定磁盤大小
2.7指定磁盤文件目錄
2.8添加網卡、單擊Customize Hardware
2.9、開始安裝。
2.10、選擇安裝嚮導語言。
2.11、分區時,選擇手動分區。
2.12、磁盤空間分配
分配boot分區爲100M,文件類型爲:ext3
分配交換空間爲 2048M,文件類型爲:swap
分配根目錄爲:剩餘全部空閒空間,文件類型爲:ext3
2.13、分配IP地址。
2.14、防火牆配置
注意:一定不要啓用防火牆。
2.15、指定操作系統語言。
2.16、指定時區。
2.17、指定root用戶密碼。
2.18、安裝軟件包,選擇定製安裝。
爲了後期配置方便,這裏選擇安裝全部軟件包。
2.19、添加共享存儲。
先關閉虛擬機。然後單擊工具欄上的VM – setting
2.20、單擊 Add,選擇HardDisk,next
2.22、單擊Advanced
2.23、選擇SCSI 1:1
2.24、配置虛擬機文件。
在虛擬機存儲目錄下,打開RH_RAC1.vmx文件。添加如下文件。
disk.locking = "false"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize ="0"
diskLib.DataCacheMinReadAheadSize ="0"
diskLib.dataCachePageSize ="4096"
diskLib.maxUnsyncedWrites = "0"
scsi1.sharedBus = "VIRTUAL"
scsi1:1.deviceType = "disk"
三、配置第一個系統
3.1、新建Oracle用戶組和用戶
[root@rac1 ~]# groupadd -g 201 oinstall
[root@rac1 ~]# groupadd -g 202 dba
[root@rac1 ~]# useradd -u 201 -g oinstall-G dba oracle
[root@rac1 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionaryword
Retype new UNIX password:
passwd: all authentication tokens updatedsuccessfully.
[root@rac1 ~]#
3.2、配置Oracle用戶環境變量
以Oracle用戶登錄,配置.bash_profile文件
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startupprograms
#export PS1="`id -un`@`/bin/hostname-s`-> "
export EDITOR=vi
export ORACLE_SID=devdb1
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/crs_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
exportPATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export NLS_LANG='SimplifiedChinese_China'.ZHS16GBK
umask 022
#ALIAS 以下爲個人設置,不用寫入。
alias tns=$ORACLE_HOME/network/admin
alias sq=”$ORACLE_HOME/bin/sqlplus '/assysdba'”
alias lss='lsnrctl start'
alias lst='lsnrctl stop'
alias vb='vi ~/.bash_profile'
alias cb='cat ~/.bash_profile'
alias zb='. ~/.bash_profile'
#PATH=$PATH:$HOME/bin
#export PATH
unset USERNAME
3.3、創建Oracle軟件目錄
[oracle@rac1 ~]$ mkdir -p $ORACLE_HOME
[oracle@rac1 ~]$ mkdir -p $ORA_CRS_HOME
3.4、檢查安裝Oracle軟件所需系統包。
以root 用戶登錄,執行如下命令:
[root@rac1 ~]# rpm –qa binutils
binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
setarch-1.6-1
libaio-0.3.105-2.i386.rpm
libaio-devel-0.3.105-2.i386.rpm
3.5、規劃共享存儲.
以root用戶登錄。
[root@rac1 ~]# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1044 8281507+ 83 Linux
/dev/sda3 1045 1305 2096482+ 82 Linux swap
Disk /dev/sdb: 5294 MB, 5551161344bytes
64 heads, 32 sectors/track, 512 cylinders
Units = cylinders of 2048 * 512 = 1048576bytes
Disk /dev/sdb doesn't contain a validpartition table
[root@rac1~]# fdisk /dev/sdb
Device contains neither a valid DOSpartition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes willremain in memory only,
until you decide to write them. After that,of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partitiontable 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-512, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK(1-512, default 512): 70
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1-512, default 1): 71
Last cylinder or +size or +sizeM or +sizeK(1-512, default 512):
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
3.6、配置裸設備自動掛載
讓系統自動掛載裸設備,在/etc/sysconfig/rawdevices文件中添加如下內容
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdb2
/dev/raw/raw3 /dev/sdb3
使修改立即生效,以root用戶執行如下命令:
/sbin/service rawdevices restart
root@rac1-> /sbin/service rawdevicesrestart
Assigning devices:
/dev/raw/raw1 --> /dev/sdb1
/dev/raw/raw1: bound to major 8, minor 17
/dev/raw/raw2 --> /dev/sdb2
/dev/raw/raw2: bound to major 8, minor 33
/dev/raw/raw3 --> /dev/sdb3
/dev/raw/raw3: bound to major 8, minor 49
done
root@rac1->
3.7、永久更改裸設備擁有者
當系統重新引導時,raw設備默認會更改擁有者爲root,爲防止raw被重新更改擁有者,修改/etc/udev/permissions.d/50-udev.permissions文件,爲原始行“raw/*:root:disk:0660”添加註釋,然後添加一個新行“raw/*:oracle:dba:0660”。
# raw devices
ram*:root:disk:0660
#raw/*:root:disk:0660
raw/*:oracle:dba:0660
3.8、修改RAW的歸屬主羣和權限
root@rac1-> chown oracle:dba/dev/raw/raw[1-3]
root@rac1-> chmod 660 /dev/raw/raw[1-3]
root@rac1-> ls -lat /dev/raw/raw*
crw-rw---- 1 oracle dba 162, 3 6月 12 18:34 /dev/raw/raw3
crw-rw---- 1 oracle dba 162, 2 6月 12 18:34 /dev/raw/raw2
crw-rw---- 1 oracle dba 162, 1 6月 12 18:34 /dev/raw/raw1
root@rac1->
3.9、集羣系統 host文件配置
將如下內容添加到/etc/hosts文件中
127.0.0.1 localhost
172.16.1.163 rac1.localdomain.com rac1
172.16.1.164 rac2.localdomain.com rac2
172.16.1.63 rac1-vip.localdomain.comrac1-vip
172.16.1.64 rac2-vip.localdomain.comrac2-vip
192.168.1.163 rac1-priv.localdomain.comrac1-priv
192.168.1.164 rac2-priv.localdomain.comrac2-priv
並確保/etc/sysconfig/network文件內容如下,紅色字體:
root@rac1-> cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=rac1.localdomain.com(或 rac1)
GATEWAY=172.16.1.1
3.10、提高oracle用戶shell限制。
編輯/etc/security/limits.conf、/etc/pam.d/login 和 /etc/profile添加如下內容:
/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
/etc/pam.d/login
session required /lib/security/pam_limits.so
/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
3.11、配置內核參數。
編輯/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
要使內核參數立即生效,執行:/sbin/sysctl -p
3.12、配置hangcheck timer 內核模塊。
內核模塊可監控系統的運行情況,並重新啓動出現故障的 RAC 節點。它使用兩個參數,即hangcheck_tick(定義系統檢查頻率)和hangcheck_margin(定義在重置 RAC 節點前的最大掛起延時)來確定節點是否出現故障。
/etc/modprobe.conf
optionshangcheck-timer hangcheck_tick=30 hangcheck_margin=180
要立即加載模塊,執行“modprobe -v hangcheck-timer”。
root@rac1-> modprobe -v hangcheck-timer
insmod /lib/modules/2.6.9-78.ELsmp/kernel/drivers/char/hangcheck-timer.kohangcheck_tick=30 hangcheck_margin=180
3.13、安裝oracle ASM包
[root@rac1 ~]# rpm -Uvhoracleasm-support-2.1.3-1.el4.i386.rpm
警告:oracleasm-support-2.1.3-1.el4.i386.rpm:V3 DSA 簽章:NOKEY, keyID b38a8516
準備中... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@rac1 ~]#
root@rac2-> rpm -Uvh oracleasm-2.6.9-78.ELsmp-2.0.5-1.el4.i686.rpm
警告:oracleasm-2.6.9-78.ELsmp-2.0.5-1.el4.i686.rpm:V3 DSA 簽章:NOKEY, keyID b38a8516
準備中... ########################################### [100%]
1:oracleasm-2.6.9-78.ELsm###########################################[100%]
3.14、生成第二個系統
關閉系統,並拷貝文件到第二個虛擬機目錄
3.15、修改第二個系統必要文件
修改/etc/hosts將主機名rac1改爲rac2.
修改IP爲第二節點IP
修改orcle主目錄下.bash_profile中的ORACLE_SID爲devdb2
四、雙機配置
4.1、配置用戶等效性
在兩個節點上都執行下面的命令
節點一
oracle@rac1-> mkdir~/.ssh
oracle@rac1-> chmod700 ~/.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:
86:01:2b:a7:4b:8c:25:81:84:19:6b:dd:e6:88:40:8coracle@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:
c6:0e:a4:09:7c:6b:6b:b9:0f:37:c1:d2:8a:e4:30:5aoracle@rac1
oracle@rac1->
節點二
oracle@rac2-> mkdir~/.ssh
oracle@rac2-> chmod700 ~/.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:
9a:26:29:29:6f:e6:b6:92:ee:c2:e6:40:c3:9b:78:e8oracle@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:
9a:26:29:29:6f:e6:b6:92:ee:c2:e6:40:c3:9b:78:e8oracle@rac2
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 rac2cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'rac2(172.16.1.154)' can't be established.
RSA key fingerprint is90:a8:f9:45:d5:fa:7c:60:6d:bb:cf:0e:16:6f:4c:25.
Are you sure you want to continueconnecting (yes/no)? yes
Warning: Permanently added'rac2,172.16.1.154' (RSA) to the list of known hosts.
oracle@rac2's password:
oracle@rac1-> ssh rac2cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@rac2's password:
oracle@rac1-> scp~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
authorized_keys 100% 1865 1.8KB/s 00:00
oracle@rac1->
在節點二上執行如下命令:
oracle@rac2-> cat~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
oracle@rac2-> cat~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@rac2-> ssh rac1 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
The authenticity of host 'rac1(172.16.1.153)' can't be established.
RSA key fingerprint is90:a8:f9:45:d5:fa:7c:60:6d:bb:cf:0e:16:6f:4c:25.
Are you sure you want to continueconnecting (yes/no)? yes
Warning: Permanently added'rac1,172.16.1.153' (RSA) to the list of known hosts.
oracle@rac2-> ssh rac1 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
oracle@rac2->
在兩個節點上,以oracle用戶分別執行如下命令,如不提示輸入密碼正配置正確
ssh rac1 date
ssh rac2 date
ssh rac1-priv date
ssh rac2-priv date
ssh rac1.localdomain.com date
ssh rac2.localdomain.com date
ssh rac1-priv.localdomain.com date
ssh rac2-priv.localdomain.com date
oracle@rac1-> ssh rac1 date
一 6月 13 15:32:30 CST 2011
oracle@rac1-> ssh rac2 date
一 6月 13 15:32:39 CST 2011
oracle@rac1-> ssh rac1-priv date
一 6月 13 15:32:37 CST 2011
oracle@rac1-> ssh rac2-priv date
一 6月 13 15:32:47 CST 2011
oracle@rac1-> ssh rac1.localdomain.comdate
一 6月 13 15:32:49 CST 2011
oracle@rac1-> ssh rac2.localdomain.comdate
一 6月 13 15:33:01 CST 2011
oracle@rac1-> sshrac1-priv.localdomain.com date
一 6月 13 15:33:05 CST 2011
oracle@rac1-> sshrac2-priv.localdomain.com date
一 6月 13 15:33:18 CST 2011
oracle@rac1->
五、安裝Oracle Clusterware
5.1、指定CRS主目錄
5.2、處理內存警告
在警告處打勾,用戶驗證內容大小。
5.3、添加第二節點網絡接口名
5.4、指定網絡接口類型
5.5、指定集羣件註冊磁盤。
5.7、指定表決磁盤位置。
5.8、執行root腳本
以root用戶在每個節點上順序執行以下兩個腳本
root@rac1-> /home/oracle/oraInventory/orainstRoot.sh
更改權限/home/oracle/oraInventory到 770.
更改組名/home/oracle/oraInventory到 oinstall.
腳本的執行已完成
root@rac1->/home/oracle/product/crs_1/root.sh
WARNING: directory '/home/oracle/product'is not owned by root
WARNING: directory '/home/oracle' is notowned by root
Checking to see if Oracle CRS stack isalready configured
/etc/oracle does not exist. Creating itnow.
Setting the permissions on OCR backupdirectory
Setting up NS directories
Oracle Cluster Registry configurationupgraded successfully
WARNING: directory '/home/oracle/product'is not owned by root
WARNING: directory '/home/oracle' is notowned by root
assigning default hostname rac1 for node 1.
assigning default hostname rac2 for node 2.
Successfully accumulated necessary OCRkeys.
Using ports: CSS=49895 CRS=49896 EVMC=49898and EVMR=49897.
node <nodenumber>: <nodename><private interconnect name> <hostname>
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 90seconds.
/home/oracle/.bash_profile: line 25: alias:/as sysdba: not found
Adding daemons to inittab
Expecting the CRS daemons to be up within600 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 CRSdaemons.
root@rac2->/home/oracle/oraInventory/orainstRoot.sh
更改權限/home/oracle/oraInventory到 770.
更改組名/home/oracle/oraInventory到 oinstall.
腳本的執行已完成
root@rac2->/home/oracle/product/crs_1/root.sh
WARNING: directory '/home/oracle/product'is not owned by root
WARNING: directory '/home/oracle' is notowned by root
Checking to see if Oracle CRS stack isalready configured
/etc/oracle does not exist. Creating itnow.
Setting the permissions on OCR backupdirectory
Setting up NS directories
Oracle Cluster Registry configurationupgraded successfully
WARNING: directory '/home/oracle/product'is not owned by root
WARNING: directory '/home/oracle' is notowned by root
assigning default hostname rac1 for node 1.
assigning default hostname rac2 for node 2.
Successfully accumulated necessary OCRkeys.
Using ports: CSS=49895 CRS=49896 EVMC=49898and EVMR=49897.
node <nodenumber>: <nodename><private interconnect name> <hostname>
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 90seconds.
/home/oracle/.bash_profile: line 24: alias:/as sysdba: not found
Adding daemons to inittab
Expecting the CRS daemons to be up within600 seconds.
CSS is active on these nodes.
rac1
rac2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD tostart
Oracle CRS stack installed and runningunder init(1M)
Running vipca(silent) for configuringnodeapps
給定的接口"eth0" 不是公共接口。應使用公共接口來配置虛擬 IP。
root@rac2->
5.9、vip安裝。
在第二節點上以root用戶執行$ORA_CRS_HOME/bin/vipca,進行配置
5.9、單擊確定
5.10、安裝後檢查
在任一節點已root用戶執行如下命令:
root@rac1-> /home/oracle/product/crs_1/bin/crs_stat-t
Name Type Target State Host
------------------------------------------------------------
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
六、安裝Oracle Database軟件
6.1、指定Oracle主目錄
6.2、選擇集羣安裝
root@rac1->/home/oracle/product/db_1/root.sh
RunningOracle10 root.sh script...
Thefollowing environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /home/oracle/product/db_1
Enter thefull 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...
Entrieswill be added to the /etc/oratab file as needed by
DatabaseConfiguration Assistant when a database is created
Finishedrunning generic part of root.sh script.
Nowproduct-specific root actions will be performed.
root@rac1->
root@rac2->/home/oracle/product/db_1/root.sh
RunningOracle10 root.sh script...
Thefollowing environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /home/oracle/product/db_1
Enter thefull 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...
Entrieswill be added to the /etc/oratab file as needed by
DatabaseConfiguration Assistant when a database is created
Finishedrunning generic part of root.sh script.
Nowproduct-specific root actions will be performed.
root@rac2->
七、配置Oracle 監聽
7.1、監聽配置後檢查
在任一節點,以root用戶執行如下命令
root@rac1->/home/oracle/product/crs_1/bin/crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....C1.lsnrapplication ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....C2.lsnrapplication ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
root@rac1->
八、配置Oracle ASM磁盤
8.1、配置Oracle ASM磁盤
在兩個節點上執行
root@rac1->/etc/init.d/oracleasm configure
Configuringthe Oracle ASM library driver.
This willconfigure the on-boot properties of the Oracle ASM library
driver. The following questions will determinewhether the driver is
loaded onboot and what permissions it will have. The current values
will beshown in brackets ('[]'). Hitting<ENTER> without typing an
answerwill keep that current value. Ctrl-Cwill abort.
Defaultuser to own the driver interface []: oracle
Defaultgroup to own the driver interface []: dba
StartOracle ASM library driver on boot (y/n) [n]: y
Scan forOracle ASM disks on boot (y/n) [y]: y
WritingOracle ASM library driver configuration: done
Initializingthe Oracle ASMLib driver: [ OK ]
Scanningthe system for Oracle ASMLib disks: [ OK ]
root@rac2->/etc/init.d/oracleasm configure
Configuringthe Oracle ASM library driver.
This willconfigure the on-boot properties of the Oracle ASM library
driver. The following questions will determinewhether the driver is
loaded onboot and what permissions it will have. The current values
will beshown in brackets ('[]'). Hitting<ENTER> without typing an
answerwill keep that current value. Ctrl-Cwill abort.
Defaultuser to own the driver interface []: oracle
Defaultgroup to own the driver interface []: dba
StartOracle ASM library driver on boot (y/n) [n]: y
Scan forOracle ASM disks on boot (y/n) [y]: y
WritingOracle ASM library driver configuration: done
Initializingthe Oracle ASMLib driver: [ OK ]
Scanningthe system for Oracle ASMLib disks: [ OK ]
root@rac2->
8.2、創建磁盤組
在任一節點,以root用戶執行如下命令
root@rac1->/etc/init.d/oracleasm createdisk VOL1 /dev/sdb3
Markingdisk "VOL1" as an ASM disk: [ OK ]
root@rac1->/etc/init.d/oracleasm scandisks
Scanningthe system for Oracle ASMLib disks: [ OK ]
root@rac1->/etc/init.d/oracleasm listdisks
VOL1
root@rac1->
九、安裝Oracle Database
9.1、Database安裝後檢查
在任一節點,已root用戶執行如下命令:
root@rac1->/oracle/product/crs_1/bin/crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.devdb.db application ONLINE ONLINE rac2
ora....b1.instapplication ONLINE ONLINE rac1
ora....b2.instapplication ONLINE ONLINE rac2
ora....SM1.asmapplication ONLINE ONLINE rac1
ora....C1.lsnrapplication ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asmapplication ONLINE ONLINE rac2
ora....C2.lsnrapplication ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
root@rac1->