創(chuàng)建oracle10g雙節(jié)點集群_第1頁
創(chuàng)建oracle10g雙節(jié)點集群_第2頁
創(chuàng)建oracle10g雙節(jié)點集群_第3頁
創(chuàng)建oracle10g雙節(jié)點集群_第4頁
創(chuàng)建oracle10g雙節(jié)點集群_第5頁
已閱讀5頁,還剩17頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、.:.;主機(jī)配置本卷須知(每個節(jié)點):每個節(jié)點效力器必需是 雙網(wǎng)卡 ,支持tcp/ip協(xié)議,安裝集群軟件效力器要支持udp防火墻封鎖service iptables stopSELinux禁用vi /etc/selinux/configSELINUX=disableip地址運用靜態(tài)配置:static網(wǎng)關(guān)要指定# Intel Corporation 82566MM Gigabit Network ConnectionDEVICE=eth0BOOTPROTO=staticIPADDR=10.1.1.NETMASK=GATEWAY=HWADDR=00:1E:

2、37:D6:FA:44ONBOOT=yes重啟network :service network restarthostname不要出如今回環(huán)地址!假設(shè)啟動過單機(jī)asm效力,請先停頓:$ORACLE_HOME/bin/localconfig delete卸載獨占方式的oracle軟件先用OUI卸載,再手工清理渣滓文件/etc/*.ora $ORACLE_HOME假設(shè)是4以上的版本,降低版本到4/etc/redhat-release-配置etc/hosts (一切節(jié)點)# Do not remove the following line, or various programs# that req

3、uire network functionality will fail. localhost.localdomain localhost:1 localhost6.localdomain6 localhost6# public Network - (eth0)10.1.1. xie.uplooking32 xie.uplooking# public virtual IP (eth0:#)10.1.1. xie.uplooking1-vip33 xie.uplooking-vip# private Interconnect - (eth0:0

4、)10.1.2. xie.uplooking1-priv32 xie.uplooking-priv配置 ifcfg-eth0:0 (一切節(jié)點)rootxie network-scripts# vi ifcfg-eth0:0# Realtek Semiconductor Co., Ltd. RTL-8/8C/8C+DEVICE=eth0:0BOOTPROTO=staticONBOOT=yesIPADDR=32NETMASK=重啟network:service network restart配置hangcheck-timer:用于監(jiān)視 Li

5、nux 內(nèi)核能否掛起vi /etc/modprobe.confoptions hangcheck-timer hangcheck_tick=30 hangcheck_margin=180自動加載hangcheck-timer vi /etc/rc.localmodprobe hangcheck-timer檢查hangcheck-timer模塊能否曾經(jīng)加載:lsmod | grep hangcheck_timer-創(chuàng)建oracle用戶:跑腳本:1./install.sh#/bin/bash. ./adduser.sh. ./sysctl.sh. ./limits.sh. ./mkdir.sh.

6、./chprofile.sh2.adduser.sh#/bin/bashADDGROUPS=oinstall dbaADDUSERS=oraclefor group in $ADDGROUPS ; do if -z $( awk -F: print $1 /etc/group |grep $group) ; then groupadd $group echo Add new group $group else echo Group $group already existed fidonefor user in $ADDUSERS ; do if -z $( awk -F: print $1

7、/etc/passwd |grep $user) ; then useradd $user echo Add new user $user else echo User $user already existed fidoneif $(usermod -g oinstall -G dba oracle) ; then echo Modify user oracle account successelse echo Modify user oracle account failurefi3.sysctl.sh#/bin/bash# echo 250 32000 100 128 /proc/sys

8、/kernel/sem# echo 536870912 /proc/sys/kernel/shmmax# echo 4096 /proc/sys/kernel/shmmni# echo 2097152 /proc/sys/kernel/shmall# echo 65536 /proc/sys/fs/file-max# echo 1024 65000 /proc/sys/net/ipv4/ip_local_port_rangeSYSCTL_FILE=/etc/sysctl.confRCLOCAL_FILE=/etc/rc.localif -f $SYSCTL_FILE ; then if -z

9、$(grep Oracle $SYSCTL_FILE) ; then cat $SYSCTL_FILE $RCLOCAL_FILE /proc/sys/kernel/shmmaxecho 4096 /proc/sys/kernel/shmmniecho 2097152 /proc/sys/kernel/shmallecho 250 32000 100 128 /proc/sys/kernel/semecho 65536 /proc/sys/fs/file-maxecho 1024 65000 /proc/sys/net/ipv4/ip_local_port_rangeEND . $RCLOCA

10、L_FILE echo Add Oracle configure kernel parameters success else echo Oracle configure kernel parameters already existed fifi4.limits.sh#/bin/bashLIMITS_FILE=/etc/security/limits.confif -f $LIMITS_FILE ; then if -z $(grep Oracle $LIMITS_FILE) ; then cat $LIMITS_FILE $PROFILE authorized_keysstu92:10.1

11、.1.su - oraclessh-keygen -t rsassh-keygen -t dsacd .sshcat *.pub authorized_keysstu90:32scp authorized_keys oracle10.1.1.:/home/oracle/.ssh/keys_dbsstu92:10.1.1.cat keys_dbs authorized_keysscp authorized_keys oracle32:/home/oracle/.ssh/測試信任關(guān)系:xie.uplooking:ssh xie.uplookingssh xie1.u

12、plookingssh xie-priv.uplookingssh xie1-priv.uplookingxie1.uplookingssh xie.uplookingssh xie1.uplookingssh xie-priv.uplookingssh xie1-priv.uplooking-測試時間同步:-預(yù)備公用卷:iscsiiscsi server - stu90yum install scsi-target-utilsvi /etc/tgt/targets.conf- backing-store /dev/sda5 initiator-address /24 -vi

13、/etc/udev/rules.d/55-openiscsi.rules-KERNEL=sd*,BUS=scsi,PROGRAM=/etc/udev/scripts/iscsidev.sh %b,SYMLINK+=iscsi/%c-vi /etc/udev/scripts/iscsidev.sh-#!/bin/bash BUS=$1 HOST=$BUS%:* -e /sys/class/iscsi_host | exit 1 file=/sys/class/iscsi_host/host$HOST/device/session*/iscsi_session*/targetname target

14、_name=$(cat $file) if -z $target_name ; then exit 1 fi echo $target_name#*:-chmod +x /etc/udev/scripts/iscsidev.shchkconfig iscsi offchkconfig iscsid offchkconfig tgtd offservice iscsi startservice iscsid startservice tgtd starttgtadm -lld iscsi -op bind -mode target -tid 1 -I ALLiscsiadm -m discove

15、ry -t sendtargets -p 10.1.1.xx service iscsi startfdisk -l/*重新掃描效力器iscsiadm -m session -uiscsiadm -m discovery -t sendtargets -p 03*/iscsi client:2vi /etc/udev/rules.d/55-openiscsi.rules-KERNEL=sd*,BUS=scsi,PROGRAM=/etc/udev/scripts/iscsidev.sh %b,SYMLINK+=iscsi/%c-vi /etc/udev/scrip

16、ts/iscsidev.sh-#!/bin/bashBUS=$1HOST=$BUS%:* -e /sys/class/iscsi_host | exit 1file=/sys/class/iscsi_host/host$HOST/device/session*/iscsi_session*/targetnametarget_name=$(cat $file)if -z $target_name ; then exit 1fiecho $target_name#*:-chmod +x /etc/udev/scripts/iscsidev.shservice iscsi startiscsiadm

17、 -m discovery -t sendtargets -p 10.1.1.xx -lservice iscsi startfdisk -l對iscsi共享盤分區(qū):fdisk /dev/sdb在一切節(jié)點:partprobe /dev/sdb在一切節(jié)點將iscsi共享分區(qū)變?yōu)槁阍O(shè)備:vi /etc/udev/rules.d/60-raw.rules-ACTION=add, KERNEL=sdb1, RUN+=/bin/raw /dev/raw/raw1 %NACTION=add, KERNEL=sdb2, RUN+=/bin/raw /dev/raw/raw2 %NACTION=add, KE

18、RNEL=sdb5, RUN+=/bin/raw /dev/raw/raw3 %NACTION=add, KERNEL=sdb6, RUN+=/bin/raw /dev/raw/raw4 %NKERNEL=raw1, MODE=0660, GROUP=oinstall, OWNER=rootKERNEL=raw2, MODE=0660, GROUP=oinstall, OWNER=oracleKERNEL=raw3, MODE=0660, GROUP=oinstall, OWNER=oracleKERNEL=raw4, MODE=0660, GROUP=oinstall, OWNER=orac

19、le在一切節(jié)點重新啟動udevstart_udev在一切節(jié)點查看rawdevicesll /dev/raw/-集群安裝可行性校驗:cd /mnttar -zxvf clusterware10GR2_32.tar.gzchown oracle.oinstall clusterware -Rsu - oraclecd /mnt/clusterware/cluvfy/./runcluvfy.sh stage -pre crsinst -n xie,xie1 -verbose報錯:oraclexie1 cluvfy$ ./runcluvfy.sh stage -pre crsinst -n xie.u

20、plooking,xie1.uplooking -verbosePerforming pre-checks for cluster services setup Checking node reachability.Check: Node reachability from node xie1 Destination Node Reachable? - - xie1 yes xie yes Result: Node reachability check passed from node xie1把 一切節(jié)點 vi /etc/hosts 改成:# Do not remove the follow

21、ing line, or various programs# that require network functionality will fail. localhost.localdomain localhost:1 localhost6.localdomain6 localhost6# public Network - (eth0)10.1.1. xie1.uplooking xie32 xie.uplooking xie# public virtual IP (eth0:#)10.1.1. xie1-vip33 xie-vip# pr

22、ivate Interconnect - (eth0:0)10.1.2. xie1-priv32 xie-priv然后在重新測試信任關(guān)系xie.uplooking:ssh xiessh xie1ssh xie-privssh xie1-privxie1.uplookingssh xiessh xie1ssh xie-privssh xie1-priv檢查勝利:下面這4個包在5版本不能裝上,沒關(guān)系Check: Package existence for compat-gcc-7.3-2.96.128 Node Name Status Comment - - - xie missi

23、ng failed xie1 missing failed Result: Package existence check failed for compat-gcc-7.3-2.96.128.Check: Package existence for compat-gcc-c+-7.3-2.96.128 Node Name Status Comment - - - xie missing failed xie1 missing failed Result: Package existence check failed for compat-gcc-c+-7.3-2.96.128.Check:

24、Package existence for compat-libstdc+-7.3-2.96.128 Node Name Status Comment - - - xie missing failed xie1 missing failed Result: Package existence check failed for compat-libstdc+-7.3-2.96.128.Check: Package existence for compat-libstdc+-devel-7.3-2.96.128 Node Name Status Comment - - - xie missing

25、failed xie1 missing failed Result: Package existence check failed for compat-libstdc+-devel-7.3-2.96.128.安裝clusterware軟件(只需在一個節(jié)點做,但要手工將其它節(jié)點參與到群):/mnt/clusterware/runInstaller在運轉(zhuǎn)/u01/crs_1/root.sh腳本之前,在一切節(jié)點修正vipca & srvctl su - oraclecd $CRS_HOME/binvi +123 vipcavi + srvctlunset LD_ASSUME_KERNEL/u01/

26、crs_1/root.sh假設(shè)報錯:Running vipca(silent) for configuring nodeappsError 0(Native: listNetInterfaces:3) Error 0(Native: listNetInterfaces:3)處理(只需在一個節(jié)點做):cd /u01/crs_1/bin#./oifcfg iflist#./oifcfg setif -global eth0/:public #./oifcfg setif -global eth0:0/:cluster_interconnect#./oifcfg ge

27、tif手工運轉(zhuǎn)vipca,完成root.sh腳本!校驗集群后臺進(jìn)程的形狀:cd /u01/crs_1/binoraclexie bin$ ./crs_stat -tName Type Target State Host -ora.xie.gsd application ONLINE ONLINE xie ora.xie.ons application ONLINE ONLINE xie ora.xie.vip application ONLINE ONLINE xie ora.xie1.gsd application ONLINE ONLINE xie1 ora.xie1.ons applic

28、ation ONLINE ONLINE xie1 ora.xie1.vip application ONLINE ONLINE xie1 在root下備份OCR:cd /u01/crs_1/bin./ocrconfig -export /home/oracle/bk/ocr/ocr1.bk-安裝數(shù)據(jù)庫軟件(只需在一個節(jié)點做,會出現(xiàn)多節(jié)點的選擇選項):安裝時選擇只安裝軟件不建庫/mnt/database/runInstaller配置集群的數(shù)據(jù)庫網(wǎng)絡(luò):netca打補丁:1.在一切節(jié)點用root用戶停集群rootxie bin# /etc/init.d/init.crs stoporaclexie

29、bin$ ./crs_stat -tCRS-0184: Cannot communicate with the CRS daemon.2.運轉(zhuǎn)./runInstaller打補丁 1. 先為clusterware 打補丁 ,運轉(zhuǎn)./runInstaller 選擇完成之后根據(jù)提示運轉(zhuǎn)2個腳本打完補丁后,會自動啟動集群效力oraclexie1 bin$ ./crs_stat -tName Type Target State Host -ora.IE.lsnr application ONLINE ONLINE xie ora.xie.gsd application ONLINE ONLINE xie ora.xie.ons application ONLINE ONLINE xie ora.xie.vip application ONLINE ONLINE xie ora.

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論