Oracle10gRACwithASM安裝在RHEL5上(簡(jiǎn)版)-創(chuàng)新互聯(lián)

1、準(zhǔn)備三個(gè)節(jié)點(diǎn)

網(wǎng)站建設(shè)哪家好,找創(chuàng)新互聯(lián)!專注于網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開(kāi)發(fā)、小程序定制開(kāi)發(fā)、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項(xiàng)目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了如皋免費(fèi)建站歡迎大家使用!

一臺(tái)做SAN設(shè)備

兩臺(tái)做ORACLE RAC節(jié)點(diǎn),每個(gè)節(jié)點(diǎn)2個(gè)網(wǎng)卡

2、分配IP地址

saneth0 10.0.0.1

c1eth0 192.168.33.101 eth0:1 192.168.33.201

c2eth0 192.168.33.102eth0:1 192.168.33.202

給eth0加入虛擬IP使用下面的命令

ifconfig eth0:1 192.168.33.201 netmask 255.255.255.0
ifconfig eth0:1 192.168.33.202 netmask 255.255.255.0

如果配置錯(cuò)誤使用下面的命令進(jìn)行刪除

ip addr del 192.168.33.202 dev eth2

3、安裝ntp服務(wù)器作為集群時(shí)鐘授時(shí)系統(tǒng),可以安裝在ipsan設(shè)備上

在san上,編輯/etc/ntp.conf

retrict default nomodify
restrict 127.0.0.1
server 127.127.1.0
fudge 127.127.1.0 stratum 8
driftfile /var/lib/ntp/drift
broadcastdelay 0.008

然后重啟ntpd服務(wù)

service ntpd restart

在c1、c2主機(jī)上去同步時(shí)鐘即可

crontab -e

*/5 * * * * /usr/sbin/ntpdate xxxxx

每五分鐘同步一次

4、修改內(nèi)核參數(shù)在c1、c2上

vim /etc/sysctl.conf

net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 2147483648
kernel.shmall = 268435456
kernel.shmmni = 4096
kernel.shmall = 2097152
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.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

5、創(chuàng)建oracle用戶和dba、oinstall用戶組

groupadd oinstall

groupadd dba

useradd -m -g oinstall -G dba oracle

6、編輯/etc/hosts文件

vim /etc/hosts

127.0.0.1localhost

192.168.33.101c1
192.168.33.201c1-vip
10.0.0.2c1-priv

192.168.33.102c2
192.168.33.202c2-vip
10.0.0.3c2-priv

10.0.0.1san
在c1、c2上都復(fù)制這些內(nèi)容

7、所有節(jié)點(diǎn)都要配置hangcheck-timer:用于監(jiān)視 Linux 內(nèi)核是否掛起

vim /etc/modprobe.conf
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

vim /etc/rc.local
modprobe hangcheck-timer

檢查hangcheck-timer模塊是否已經(jīng)加載:
lsmod | grep hangcheck_timer

8、配置oracle用戶雙機(jī)(多機(jī))互信

su - oracle
ssh-keygen -t rsa
ssh-keygen -t dsa
cd .ssh
cat *.pub > authorized_keys

然后每個(gè)節(jié)點(diǎn)都進(jìn)行

cat *.pub > authorized_keys的追加

9、配置ipsan

在san主機(jī)上

yum -y install scsi-target-utils
yum -y install iscsi-initiator-utils

vim /etc/tgt/targets.conf

backing-store /dev/sdb1
vender_id IET
product_id V1

backing-store /dev/sdc1
vender_id IET
product_id V2

backing-store /dev/sdd1
vender_id IET
product_id V3

backing-store /dev/sde1
vender_id IET
product_id V4

backing-store /vote/disk1.img
vender_id IET
product_id V5

backing-store /vote/disk2.img
vender_id IET
product_id V6

service tgtd restart

chkconfig tgtd on

10、導(dǎo)入ipsan的公共存儲(chǔ)

yum install iscsi-initiator-utils -y

service iscsid start

iscsiadm -m discovery -t st -p san

service iscsi start

chkconfig iscsid on

chkconfig iscsi on

11、安裝依賴包c(diǎn)1、c2

yum install binutilscompat-libstdc++elfutils-libelfelfutils-libelf-develglibcglibc-commonglibc-develglibc-headersgccgcc-c++libaiolibaio-devel libgcclibstdc++libstdc++-develmakesysstatunixODBCunixODBC-devel-y

12、安裝oracleasm包c(diǎn)1、c2

rpm -ivh oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm oracleasmlib-2.0.4-1.el5.x86_64.rpm oracleasm-support-2.1.7-1.el5.x86_64.rpm

13、安裝cluster

cd /mnt/clusterware/cluvfy/

./runcluvfy.sh stage -pre crsinst -nc1,c2 -verbose

cd /mnt/clusterware/
./runInstaller-ignoreSysPrereqs

在Specify Home Details頁(yè)面

手工修改crs安裝終點(diǎn): /u01/crs_1

在Specify Cluster Configuration頁(yè)面

指定兩個(gè)節(jié)點(diǎn)

c1c1-privc1-vip

c2c2-privc2-vip

在Specify Network Interface Usage頁(yè)面

eth0192.168.33.0Public

eth010.0.0.0Private

在Specify Oracle Cluster Registry(OCR) Location頁(yè)面

指定

External Redundancy

Specify OCR Location: /dev/raw/raw1

在Specify Voting Disk Location頁(yè)面

指定

External Redundancy

Voting Disk Location: /dev/raw/raw2

14、安裝cluster后續(xù)工作

在c1運(yùn)行

/u01/app/oracle/oraInventory/orainstRoot.sh

在c2運(yùn)行

/u01/app/oracle/oraInventory/orainstRoot.sh

在兩個(gè)節(jié)點(diǎn)上修改兩個(gè)腳本來(lái)避免bug出現(xiàn)

vim /u01/crs_1/bin/vipca

LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
fi
unset LD_ASSUME_KERNEL

vim /u01/crs_1/bin/srvctl

export LD_ASSUME_KERNEL
unset LD_ASSUME_KERNEL

在c1運(yùn)行

/u01/crs_1/root.sh

在c2運(yùn)行

/u01/crs_1/root.sh

在最后一個(gè)節(jié)點(diǎn)運(yùn)行/u01/crs_1/root.sh會(huì)報(bào)錯(cuò)
Running vipca(silent) for configuring nodeapps
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]

需要手工設(shè)置oracle的IP:
cd /u01/crs_1/bin
-------------------------------------------------------------------
./oifcfg iflist
eth0 192.168.33.0
eth0 192.168.33.0

./oifcfg setif -global eth0/192.168.33.0:public
./oifcfg setif -global eth0:1/192.168.33.0:cluster_interconnect

./oifcfg getif
eth0 192.168.33.0 global public
eth0:1 192.168.33.0 global cluster_interconnect

運(yùn)行vipca

/u01/crs_1/bin/vipca

在Step2指定IP

c1c1-vip192.168.1.201255.255.255.0

c2c2-vip192.168.1.202255.255.255.0

如果啟動(dòng)時(shí)發(fā)現(xiàn)ons服務(wù)無(wú)法啟動(dòng),可以暫時(shí)忽略,重啟主機(jī)后可以啟動(dòng)它。

如果碰到CRS-0184錯(cuò)誤

可以嘗試重啟CRS守護(hù)進(jìn)程/etc/rc.d/init.d/init.crs start

如果有問(wèn)題可以嘗試查看/var/log/messages查看系統(tǒng)級(jí)錯(cuò)誤

兩個(gè)腳本都運(yùn)行完就安裝完cluster了

然后使用crs_stat -t查看下?tīng)顟B(tài),如果都是ONLINE狀態(tài)就是正常。

15、安裝Oracle數(shù)據(jù)庫(kù)引擎

在Select Installation Type頁(yè)面

選擇 Enterprise Edition

在Specify Home Details頁(yè)面

填寫(xiě)Path: /u01/app/oracle/product/10.2.0/db_1

在Specify Hardware Cluster Installation Mode

勾選兩個(gè)節(jié)點(diǎn)c1,c2

在Select Configuration Option頁(yè)面

選擇 Install database Software only

安裝完畢后,先后在c1和c2上運(yùn)行

/u01/app/oracle/product/10.2.0/db_1/root.sh腳本

16、安裝ASM數(shù)據(jù)庫(kù)實(shí)例

在c1上配置oracleasm

/etc/init.d/oracleasm configure

先在c1上創(chuàng)建oracleasm磁盤(pán)

/etc/init.d/oracleasm createdisk D1 /dev/sdb1

/etc/init.d/oracleasm createdisk D2 /dev/sdc1

/etc/init.d/oracleasm createdisk D3 /dev/sdd1

/etc/init.d/oracleasm createdisk D4 /dev/sde1

在c2上配置oracleasm

/etc/init.d/oracleasm configure

在c2上掃描oracleasm的變化

/etc/init.d/oracleasm scandisks

在c1用dbca創(chuàng)建ASM實(shí)例

選擇D1, D2, D3, D4,選擇Normal模式

17、在ASM上創(chuàng)建數(shù)據(jù)庫(kù)

啟動(dòng)dbca

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。

分享標(biāo)題:Oracle10gRACwithASM安裝在RHEL5上(簡(jiǎn)版)-創(chuàng)新互聯(lián)
網(wǎng)站鏈接:http://bm7419.com/article24/dehhce.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)自適應(yīng)網(wǎng)站、微信公眾號(hào)、靜態(tài)網(wǎng)站、響應(yīng)式網(wǎng)站、品牌網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

微信小程序開(kāi)發(fā)