您好,登錄后才能下訂單哦!
Solaris 10(x86)構(gòu)建Oracle 11gR2 RAC之--配置系統(tǒng)環(huán)境(1)
系統(tǒng)環(huán)境:
操作系統(tǒng):Solaris 10(x86-64)
Cluster: Oracle GRID 11.2.0
Oracle: Oracle 11.2.0.1.0
如圖所示:RAC 系統(tǒng)架構(gòu)
對(duì)于Oracle 11G構(gòu)建RAC首先需要構(gòu)建GI(Grid Infrastructure)的架構(gòu)
Oracle 11g第二版在新功能上與第一版有了很大的改進(jìn),這里把本次安裝用到的新功能簡(jiǎn)單介紹一下,其中主要是把Clusterware 集群件集成到了Grid網(wǎng)格組件中,并且添加了Grid Naming Service(GNS)網(wǎng)格名稱(chēng)服務(wù)提供名稱(chēng)轉(zhuǎn)換,這樣兩個(gè)RAC節(jié)點(diǎn)的虛擬IP地址(VIP)可以通過(guò)DHCP自動(dòng)獲取,不需要手工指定了,這是變化比較大的一點(diǎn);
還有Cluster Time Synchronization Service(CTSS)集群時(shí)間同步服務(wù),在沒(méi)有NTP服務(wù)時(shí),該功能可以保證所有RAC節(jié)點(diǎn)的時(shí)間保持一致;ASM可以作為統(tǒng)一的存儲(chǔ)把Oracle Cluster Registry(OCR)和Voting disks統(tǒng)一安裝在ASM磁盤(pán)上,不再需要單獨(dú)安裝集群文件系統(tǒng)了,11g第二版也不再支持裸設(shè)備了(之前可以把集群件安裝到裸設(shè)備上);
還有一個(gè)有趣的功能SCAN(Single Client Access Name)即單客戶(hù)端訪(fǎng)問(wèn)名稱(chēng)而且該功能包括了Failover故障自動(dòng)切換功能,在訪(fǎng)問(wèn)集群是只寫(xiě)一個(gè)SCAN名稱(chēng)就可以了,不需要象以前要把所有節(jié)點(diǎn)的VIP寫(xiě)在應(yīng)用程序的配置文件里面了,這樣就大大方便了客戶(hù)端程序?qū)AC系統(tǒng)的訪(fǎng)問(wèn),但該功能需要DNS服務(wù)器的支持,這個(gè)功能本文中會(huì)重點(diǎn)介紹因?yàn)槲沂且粋€(gè)應(yīng)用程序員感覺(jué)這是一個(gè)最好的新功能,在用Spring框架連接RAC系統(tǒng)時(shí)也非常方便;還有一些新特性如
Automatic Storage Management Cluster File System(ACFS) ASM集群文件系統(tǒng)和Intelligent Platform. Management Interface(IPMI)集成等。
本案例,通過(guò)Solairs 10(x86-64)系統(tǒng),構(gòu)建Oracle 11g 的RAC;共享存儲(chǔ)采用RAW+ASM的方式進(jìn)行管理。
一、系統(tǒng)環(huán)境配置 (在所有node)
1、操作系統(tǒng):
[root@node1:/]# uname -a SunOS node1 5.10 Generic_142910-17 i86pc i386 i86pc [root@node1:/]# isainfo -kv 64-bit amd64 kernel modules
2、網(wǎng)絡(luò)配置:
[root@node1:/]# cat /etc/hosts # # Internet host table # ::1 localhost 127.0.0.1 localhost 192.168.8.11 node1 loghost 192.168.8.13 node1-vip 10.10.10.11 node1-priv 192.168.8.12 node2 192.168.8.14 node2-vip 10.10.10.12 node2-priv 192.168.8.15 scan-ip ---本案例為測(cè)試環(huán)境,沒(méi)有配置DNS Server;對(duì)于SCAN ip采用hosts文件解析 網(wǎng)卡配置信息: [root@node1:/]# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.8.11 netmask ffffff00 broadcast 192.168.8.255 ether 8:0:27:e9:13:c7 e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.8.13 netmask ffffff00 broadcast 192.168.8.255 e1000g1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 10.10.10.11 netmask ffffff00 broadcast 10.10.10.255 ether 8:0:27:54:d5:2c [root@node2:/]# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.8.12 netmask ffffff00 broadcast 192.168.8.255 ether 8:0:27:9f:cd:76 e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.8.14 netmask ffffff00 broadcast 192.168.8.255 e1000g1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 10.10.10.12 netmask ffffff00 broadcast 10.10.10.255 ether 8:0:27:3c:6d:ce
3、 建立oracle、grid用戶(hù)和組:
[root@node1:/]# cat mkusr.sh groupadd -g 200 oinstall groupadd -g 201 dba groupadd -g 202 oper groupadd -g 203 asmadmin groupadd -g 204 asmoper groupadd -g 205 asmdba useradd -u 200 -g oinstall -G dba,asmdba,oper -d /export/home/oracle -m -s /usr/bin/bash oracle useradd -u 201 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba -d /export/home/grid -m -s /usr/bin/bash grid [root@node1:/]# id -a oracle uid=200(oracle) gid=200(oinstall) groups=201(dba),202(oper),205(asmdba) [root@node1:/]# id -a grid uid=201(grid) gid=200(oinstall) groups=201(dba),202(oper),203(asmadmin),204(asmoper),205(asmdba)
4、建立相應(yīng)安裝目錄:
[root@node1:/]# cat mkdir.sh mkdir -p /export/home/oraInventory chown -R grid:oinstall /export/home/oraInventory/ chmod -R 775 /export/home/oraInventory/ mkdir -p /export/home/11.2.0/grid chown -R grid:oinstall /export/home/11.2.0/grid/ chmod -R 775 /export/home/11.2.0/grid/ mkdir -p /export/home/ora11 mkdir -p /export/home/ora11/cfgtoollogs mkdir -p /export/home/ora11/product/11.2.0/db_1 chown -R oracle:oinstall /export/home/ora11 chmod -R 775 /export/home/ora11 [root@node1:/]# ls -l /export/home total 26 drwxr-xr-x 3 root root 512 Jan 22 16:18 11.2.0 drwxr-xr-x 2 grid oinstall 512 Jan 22 16:10 grid drwx------ 2 root root 8192 Oct 15 2013 lost+found drwxrwxr-x 4 oracle oinstall 512 Jan 22 16:18 ora11 drwxrwxr-x 2 grid oinstall 512 Jan 22 16:18 oraInventory drwxr-xr-x 2 oracle oinstall 512 Jan 22 16:11 oracle
5、建立oracle、grid用戶(hù)環(huán)境變量:
[oracle@node1:/export/home/oracle]$ cat .profile export EDITOR=vi export ORACLE_SID=prod1 ;; ORACLE_SID=prod2 (node2) export ORACLE_BASE=/export/home/ora11 export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin umask 022 [grid@node1:/export/home/grid]$ cat .profile export EDITOR=vi export ORACLE_SID=+ASM1 ;;ORACLE_SID=+ASM2 (node2) export ORACLE_BASE=/export/home/ora11 export ORACLE_HOME=/export/home/11.2.0/grid export GRID_HOME=/export/home/11.2.0/grid export LD_LIBRARY_PATH=$ORACLE_HOME/lib export THREADS_FLAG=native export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin umask 022
6、配置網(wǎng)絡(luò)參數(shù)(用于cache fusion)
檢查網(wǎng)絡(luò)參數(shù): [root@node1:/]# /usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port 32768 65535 [root@node1:/]# cat mknet.sh /usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000 /usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65500 /usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000 /usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500 [root@node1:/]# /usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port 9000 65500
7、修改內(nèi)核參數(shù):
[root@node2:/]# cat /etc/system set noexec_user_stack=1 set semsys:seminfo_semmni=100 set semsys:seminfo_semmns=1024 set semsys:seminfo_semmsl=256 set semsys:seminfo_semvmx=32767 set shmsys:shminfo_shmmax=4294967295 set shmsys:shminfo_shmmni=100
8、配置shell資源訪(fǎng)問(wèn):
[root@node1:/]# cat /etc/profile ulimit -t unlimited ulimit -f unlimited ulimit -d unlimited ulimit -s unlimited ulimit -n unlimited ulimit -v unlimited
二、配置共享存儲(chǔ)
對(duì)于Oracle 11g RAC,在共享存儲(chǔ)中OCR和VOTE磁盤(pán),不能再采用裸設(shè)備,而都是通過(guò)ASM磁盤(pán)組進(jìn)行管理。 OCR和VOTE磁盤(pán):(建立ASM NORMAL REDUNDANCY) OCR_VOTE DISK1 /dev/rdsk/c0t2d0s0 OCR_VOTE DISK1 /dev/rdsk/c0t2d0s1 OCR_VOTE DISK1 /dev/rdsk/c0t2d0s3 DataBase磁盤(pán):(建立ASM NORMAL REDUNDANCY) ASM_DATA1 /dev/rdsk/c0t2d0s4 ASM_DATA2 /dev/rdsk/c0t2d0s5 RECOVERY AREA:(建立ASM NORMAL REDUNDANCY) ASM_RCY1 /dev/rdsk/c0t2d0s6 ASM_RCY1 /dev/rdsk/c0t2d0s7
1、建立磁盤(pán)分區(qū)(raw)(在node1)
注意:
在分區(qū)時(shí),不能從Cylinder 0開(kāi)始,而應(yīng)該從Cylinder 1開(kāi)始,進(jìn)行分區(qū),建立raw設(shè)備。
[root@node1:/]# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <DEFAULT cyl 2607 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@0,0 1. c0t2d0 <DEFAULT cyl 2608 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@2,0 Specify disk (enter its number): 1 selecting c0t2d0 [disk formatted] format> p WARNING - This disk may be in use by an application that has modified the fdisk table. Ensure that this disk is not currently in use before proceeding to use fdisk. format> fdisk No fdisk table exists. The default partition for the disk is: a 100% "SOLARIS System" partition Type "y" to accept the default partition, otherwise type "n" to edit the partition table. y partition> 0 Part Tag Flag Cylinders Size Blocks 0 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: 1 Enter partition size[0b, 0c, 1e, 0.00mb, 0.00gb]: 1024mb partition> 1 Part Tag Flag Cylinders Size Blocks 1 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: 132 Enter partition size[0b, 0c, 132e, 0.00mb, 0.00gb]: 1024mb partition> 3 Part Tag Flag Cylinders Size Blocks 3 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: 263 Enter partition size[0b, 0c, 263e, 0.00mb, 0.00gb]: 1024mb partition> 4 Part Tag Flag Cylinders Size Blocks 4 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: 394 Enter partition size[0b, 0c, 394e, 0.00mb, 0.00gb]: 5gb partition> 5 Part Tag Flag Cylinders Size Blocks 5 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: 1047 Enter partition size[0b, 0c, 1047e, 0.00mb, 0.00gb]: 5gb partition> 5 Part Tag Flag Cylinders Size Blocks 5 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: 1047 Enter partition size[0b, 0c, 1047e, 0.00mb, 0.00gb]: 5gb partition> 6 Part Tag Flag Cylinders Size Blocks 6 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: 1700 Enter partition size[0b, 0c, 1700e, 0.00mb, 0.00gb]: 3gb partition> 7 Part Tag Flag Cylinders Size Blocks 7 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: 2092 Enter partition size[0b, 0c, 2092e, 0.00mb, 0.00gb]: 3gb partition> p Current partition table (unnamed): Total disk cylinders available: 2607 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 unassigned wm 1 - 131 1.00GB (131/0/0) 2104515 1 unassigned wm 132 - 262 1.00GB (131/0/0) 2104515 2 backup wu 0 - 2606 19.97GB (2607/0/0) 41881455 3 unassigned wm 263 - 393 1.00GB (131/0/0) 2104515 4 unassigned wm 394 - 1046 5.00GB (653/0/0) 10490445 5 unassigned wm 1047 - 1699 5.00GB (653/0/0) 10490445 6 unassigned wm 1700 - 2091 3.00GB (392/0/0) 6297480 7 unassigned wm 2092 - 2483 3.00GB (392/0/0) 6297480 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 unassigned wm 0 0 (0/0/0) 0 partition> label Ready to label disk, continue? y partition> quit 在node2查看磁盤(pán)分區(qū)信息: [root@node2:/]# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <DEFAULT cyl 2607 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@0,0 1. c0t2d0 <DEFAULT cyl 2607 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@2,0 Specify disk (enter its number): 1 selecting c0t2d0 [disk formatted] ...... partition> p Current partition table (original): Total disk cylinders available: 2607 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 unassigned wm 1 - 131 1.00GB (131/0/0) 2104515 1 unassigned wm 132 - 262 1.00GB (131/0/0) 2104515 2 backup wu 0 - 2606 19.97GB (2607/0/0) 41881455 3 unassigned wm 263 - 393 1.00GB (131/0/0) 2104515 4 unassigned wm 394 - 1046 5.00GB (653/0/0) 10490445 5 unassigned wm 1047 - 1699 5.00GB (653/0/0) 10490445 6 unassigned wm 1700 - 2091 3.00GB (392/0/0) 6297480 7 unassigned wm 2092 - 2483 3.00GB (392/0/0) 6297480 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 unassigned wm 0 0 (0/0/0) 0 修改raw設(shè)備屬性(所有node): [root@node1:/]# chown grid:asmadmin /dev/rdsk/c0t2d0s* [root@node1:/]# chmod 660 /dev/rdsk/c0t2d0s* [root@node1:/]# ls -l /devices/pci@0,0/pci8086,2829@d/disk@2,0:a,raw crw-rw---- 1 grid asmadmin 30, 128 Jan 22 17:31 /devices/pci@0,0/pci8086,2829@d/disk@2,0:a,raw
---未完待續(xù).....
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。