linux_oracle10g_rac_asm_命令列配置rac記錄

wangzhensheng發表於2010-12-17

windows + VMWARE +oracle 10G rac +asm
1.安裝vmware:
建立共享磁碟:scsi1:1
rac.vmx中增加
disk.locking="FALSE"
scsi1:sharedBus="VIRTUAL"

設定/etc/udev/rules.d/60-raw.rules
增加
ACTION=="add",KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add",KERNEL=="sdc2",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add",KERNEL=="raw[1-2]", OWNER="oracle", GROUP="dba", MODE="660"

/etc/sysconfig/rawdevices 增加
/dev/raw/raw1 /dev/sdc1
/dev/raw/raw2 /dev/sdc2

.安裝clusterware
安裝libXp-*.rpm
vi /etc/sysctl.conf
kernel.shmmax=2147483648
kernel.sem=250 32000 100 128
fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144

========================================================
初始化orc,votedisk
cd $CRS_HOME/install/
./rootdelete.sh
./rootdeinstall.sh

新增介面配置:一個節點上配置
oifcfg getif
oifcfg setif -global eth0/10.142.132.0:public
oifcfg setif -global eth1/10.10.10.0:cluster_interconnect

dd if=/dev/zero of=/dev/raw/raw1 bs=1M count=101
dd if=/dev/zero of=/dev/raw/raw2 bs=1M count=101

cd $CRS_HOME/
./root.sh
其他節點也需要執行
cd $CRS_HOME/
./root.sh

========================
crs_profile -create lisenter1 -t application -a /export/home/oracle/products/10.2/crs_1/bin/racgwrap -h rac1 -p restricted -r ora.rac1.vip -o ci=600,ra=6,ft=0,fi=0,as=1,st=600,ra=6
echo "register:rac1"
crs_register ora.rac1.vip
crs_register ora.rac1.gsd
crs_register ora.rac1.ons
crs_register ora.rac1.LISTENER_RAC1.lsnr
echo ""
echo "register:rac2"
crs_register ora.rac2.vip
crs_register ora.rac2.gsd
crs_register ora.rac2.ons
crs_register ora.rac2.LISTENER_RAC2.lsnr
echo ""
echo "unregister:rac1"
crs_unregister ora.rac1.gsd
crs_unregister ora.rac1.LISTENER_RAC1.lsnr
crs_unregister ora.rac1.ons
crs_unregister ora.rac1.vip
echo ""
echo "unregister:rac2"
crs_unregister ora.rac2.gsd
crs_unregister ora.rac2.LISTENER_RAC2.lsnr
crs_unregister ora.rac2.ons
crs_unregister ora.rac2.vip
==============================
crs_stat -ls

crs_setperm ora.rac1.ons -g dba
crs_setperm ora.rac1.ons -u oracle
crs_setperm ora.rac1.gsd -g dba
crs_setperm ora.rac1.gsd -u oracle
crs_setperm ora.rac1.LISTENER_RAC1.lsnr -g dba
crs_setperm ora.rac1.LISTENER_RAC1.lsnr -u oracle
--------------------------
crs_setperm ora.rac2.ons -g dba
crs_setperm ora.rac2.ons -u oracle
crs_setperm ora.rac2.gsd -g dba
crs_setperm ora.rac2.gsd -u oracle
crs_setperm ora.rac2.LISTENER_RAC2.lsnr -g dba
crs_setperm ora.rac2.LISTENER_RAC2.lsnr -u oracle

================================
echo "============================"
echo ""
echo "start:rac1"
crs_start -f ora.rac1.vip
crs_start -f ora.rac1.gsd
crs_start -f ora.rac1.ons
crs_start -f ora.rac1.LISTENER_RAC1.lsnr
echo ""
echo "start:rac2"
crs_start -f ora.rac2.vip
crs_start -f ora.rac2.gsd
crs_start -f ora.rac2.ons
crs_start -f ora.rac2.LISTENER_RAC2.lsnr
echo ""
echo "stop:rac1"
crs_stop -f ora.rac1.gsd
crs_stop -f ora.rac1.LISTENER_RAC1.lsnr
crs_stop -f ora.rac1.ons
crs_stop -f ora.rac1.vip
echo ""
echo "stop:rac2"
crs_stop -f ora.rac2.gsd
crs_stop -f ora.rac2.LISTENER_RAC2.lsnr
crs_stop -f ora.rac2.ons
crs_stop -f ora.rac2.vip

==========================
srvctl stop nodeapps -n rac1
srvctl remove nodeapps -n rac1 -f
srvctl add nodeapps -n rac1 -o $ORACLE_HOME -A 10.142.132.210/255.255.255.0/eth0
srvctl start nodeapps -n rac1

srvctl stop nodeapps -n rac2
srvctl remove nodeapps -n rac2 -f
srvctl add nodeapps -n rac2 -o $ORACLE_HOME -A 10.142.132.211/255.255.255.0/eth0
srvctl start nodeapps -n rac2

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8806316/viewspace-1043178/,如需轉載,請註明出處,否則將追究法律責任。

相關文章