Solaris8上安裝RAC10202環境(一)
前一陣一直在測試ORACLE 10R2的RAC環境在Solaris上的安裝。碰到了很多的問題,不過最後總算成功了,這裡簡單總結一下安裝步驟,以及碰到的問題和解決方法。
首先需要安裝的是作業系統,這裡就不詳細描述了,Solaris8的安裝可以參考:http://yangtingkun.itpub.net/post/468/263494
Solaris8如果要安裝10g的RAC,需要打以下的補丁:
108528-23, SunOS 5.8: kernel update patch
108652-66, X11 6.4.1: Xsun patch
108773-18, SunOS 5.8: IIIM and X I/O Method patch
108921-16, CDE 1.4: dtwm patch
108940-53, Motif 1.2.7 and 2.1.1: Runtime lib. patch for Solaris 8
108987-13, SunOS 5.8: Patch for patchadd and patchrm
108989-02, /usr/kernel/sys/acctctl & /.../exacctsys patch
108993-45, SunOS 5.8: LDAP2 client, libc, libthread and libnsl libraries patch
109147-24, SunOS 5.8: linker patch
110386-03, SunOS 5.8: RBAC Feature Patch
111023-02, SunOS 5.8: /kernel/fs/mntfs and ... sparcv9/mntfs
111111-03, SunOS 5.8: /usr/bin/nawk patch
111308-03, SunOS 5.8: /usr/lib/libmtmalloc.so.1 patch
111310-01, SunOS 5.8: /usr/lib/libdhcpagent.so.1 patch
112396-02, SunOS 5.8: /usr/bin/fgrep patch
111721-04, SunOS 5.8: Math Library (libm) patch
112003-03, SunOS 5.8: Unable to load fontset ... iso-1 or iso-15
112138-01, SunOS 5.8: usr/bin/domainname patch
其中最後三個是可選的。這些補丁可以單獨打,也可以透過J2SE補丁包一起打。單個補丁的下載和安裝可以參考:http://yangtingkun.itpub.net/post/468/252372
下面簡單介紹一下安裝J2SE Patch Cluster的步驟:
安裝補丁的下載地址是:
選擇J2SE Solaris 8,下載到本地後,執行unzip解壓:
# unzip J2SE_Solaris_8_Recommended.zip
# cd J2SE_Solaris_8_Recommended
# ./install_cluster
安裝之後為了使補丁生效需要重啟系統:
# reboot
當然,也可以等到一會修改系統引數後一起重啟:
兩臺伺服器作業系統和補丁都安裝結束後,下面檢查系統是否滿足RAC的安裝需求,這些檢查需要在兩個伺服器上進行:
# /usr/sbin/prtconf |grep "Memory Size"
# /usr/sbin/prtconf | grep "Memory size"
Memory size: 4096 Megabytes
# /usr/sbin/swap -s
total: 20928k bytes allocated + 4680k reserved = 25608k used, 11801848k available
# df -k /tmp
Filesystem kbytes used avail capacity Mounted on
swap 11799856 24 11799832 1% /tmp
# df -k /data
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t1d0s7 35009161 1427455 33231615 5% /data
# /bin/isainfo -kv
64-bit sparcv9 kernel modules
內容需要1G以上,如果記憶體小於2G,則swap空間至少是記憶體的1.5倍,記憶體大於2G,則swap空間最小和記憶體大小相同。/tmp目錄需要至少400M空間。安裝Oracle的目錄至少需要5.2G以上的空間。使用isainfo檢查系統的架構,當前晶片是64位SPARC。
系統滿足安裝需要,下面可以建立oracle使用者和相關組了,在一個節點上先建立:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# mkdir /export/home/oracle
# /usr/sbin/useradd -g oinstall -G dba -d /export/home/oracle oracle
# chown oracle:oinstall /export/home/oracle
# chown -R oracle:oinstall /data
# passwd oracle
下面檢查nobody使用者是否存在,如果nobody不存在,需要建立該使用者。並檢測oracle的使用者id和dba、oinstall的組id:
# id nobody
uid=60001(nobody) gid=60001(nobody)
# id oracle
uid=100(oracle) gid=100(oinstall)
# more /etc/group
root::0:root
other::1:
bin::2:root,bin,daemon
sys::3:root,bin,sys,adm
adm::4:root,adm,daemon
uucp::5:root,uucp
mail::6:root
tty::7:root,tty,adm
lp::8:root,lp,adm
nuucp::9:root,nuucp
staff::10:
daemon::12:root,daemon
sysadmin::14:
nobody::60001:
noaccess::60002:
nogroup::65534:
oinstall::100:
dba::101:oracle
根據上面的資訊,再另一臺伺服器上建立組和使用者:
# groupadd -g 100 oinstall
# groupadd -g 101 dba
# mkdir /export/home/oracle
# useradd -u 100 -g oinstall -G dba -d /export/home/oracle oracle
# chown oracle:oinstall /export/home/oracle
# chown -R oracle:oinstall /data
# id nobody
uid=60001(nobody) gid=60001(nobody)
# passwd oracle
下面為ORACLE使用者設定環境變數,再一臺伺服器上切換oracle使用者登陸,編輯.profile檔案,輸入以下內容:
# su - oracle
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001
$ vi .profile
umask 022
ORACLE_SID=testrac1
export ORACLE_SID
ORACLE_BASE=/data/oracle
export ORACLE_BASE
ORACLE_HOME=/data/oracle/product/10.2/database
export ORACLE_HOME
NLS_LANG='SIMPLIFIED CHINESE_CHINA.ZHS16GBK'
export NLS_LANG
PATH=$PATH:$ORACLE_HOME/bin
export PATH
DISPLAY=172.25.6.201:1.0
export DISPLAY
上面的DISPLAY變數設定的是本機的IP地址。
在另一臺伺服器執行同樣的操作,不過將ORACLE_SID的內容替換為testrac2。
下面設定網路環境,由於配置ssh比較繁瑣,這裡選擇使用rcp的方式。首先編輯兩個伺服器的/etc/hosts檔案,分別輸入下面的資訊:
# more /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
172.25.198.222 racnode1 loghost
172.25.198.224 racnode1-vip
10.0.0.1 racnode1-priv
172.25.198.223 racnode2
172.25.198.225 racnode2-vip
10.0.0.2 racnode2-priv
另一個伺服器:
# more /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
172.25.198.223 racnode2 loghost
172.25.198.222 racnode1 loghost
172.25.198.224 racnode1-vip
10.0.0.1 racnode1-priv
172.25.198.225 racnode2-vip
10.0.0.2 racnode2-priv
分別在racnode1和racnode2上編輯oracle使用者下的/export/home/oracle/.rhosts檔案,新增如下內容:
$ vi .rhosts
racnode1
racnode1-vip
racnode1-priv
racnode2
racnode2-vip
racnode2-priv
下面為系統新增私有IP地址:
# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843
inet 172.25.198.222 netmask ffff0000 broadcast 172.25.255.255
ether 0:3:ba:38:4a:2f
# ifconfig ce1 plumb
# ifconfig ce1 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255 up
為了啟動後,ce1可以自動配置,編輯/etc/hostname.ce1檔案:
# vi /etc/hostname.ce1
racnode1-priv
然後新增相應的掩碼和廣播地址,在/etc/netmasks檔案後面新增:
10.0.0.0 255.255.255.0
另外需要新增預設的閘道器:
# vi /etc/defaultrouter
172.25.2.1
在racnode2上:
# ifconfig ce1 plumb
# ifconfig ce1 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255 up
# vi /etc/hostname.ce1
racnode2-priv
# more /etc/netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center. Currently this number is restricted to being a class
# A, B, or C network number. In the future we should be able to support
# arbitrary network numbers per the Classless Internet Domain Routing
# guidelines.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
172.25.0.0 255.255.0.0
10.0.0.0 255.255.255.0
# vi /etc/defaultrouter
172.25.2.1
至此,網路配置完成,可以透過oracle執行rcp來簡單檢查網路配置是否成功:
# su - oracle
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001
$ ls
$ echo "abc" >> 222local
$ ls
222local
$ rcp 222local 172.25.198.223:/export/home/oracle/223rcp
$ rcp 222local 10.0.0.2:/export/home/oracle/2rcp
$ rcp 222local 172.25.198.222:/export/home/oracle/222localrcp
$ rcp 222local 10.0.0.1:/export/home/oracle/1localrcp
$ ls
1localrcp 222local 222localrcp
在racnode2上執行:
# su - oracle
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001
$ ls
223rcp 2rcp
$ rcp 223rcp 172.25.198.222:/export/home/oracle/222rcp
$ rcp 223rcp 172.25.198.223:/export/home/oracle/223localrcp
$ rcp 223rcp 10.0.0.1:/export/home/oracle/1rcp
$ rcp 223rcp 10.0.0.2:/export/home/oracle/2localrcp
$ ls
223localrcp 223rcp 2localrcp 2rcp
這是racnode1的oracle使用者下將看到:
$ ls
1localrcp 1rcp 222local 222localrcp 222rcp
如果上面的命令執行成功,且沒有提示密碼,最終結果也和上面顯示的一致,說明rcp部分網路配置已經成功。
在兩個節點上檢查nscd程式是否啟動,該程式預設會在系統啟動時啟動:
# ps -ef|grep nscd
root 216 1 0 16:14:27 ? 0:00 /usr/sbin/nscd
root 374 342 0 16:30:23 pts/1 0:00 grep nscd
如果沒有啟動,可以使用/etc/init.d/nscd start來啟動。
在兩個節點上下面檢查軟體包是否都已經安裝:
# uname -r
5.8
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWxwfnt SUNWsprox
system SUNWarc Archive Libraries
system SUNWbtool CCS tools bundled with SunOS
system SUNWhea SunOS Header Files
system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
system SUNWlibC Sun Workshop Compilers Bundled libC
system SUNWlibm Sun WorkShop Bundled libm
system SUNWlibms Sun WorkShop Bundled shared libm
system SUNWsprot Solaris Bundled tools
system SUNWsprox Sun WorkShop Bundled 64-bit make library
system SUNWtoo Programming Tools
system SUNWxwfnt X Window System platform required fonts
下面要修改作業系統的核心引數,在兩個節點上編輯/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_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
修改完成後重啟系統:
# reboot
檢查UDP協議的配置:
# ndd /dev/udp udp_xmit_hiwat
8192
# ndd /dev/udp udp_recv_hiwat
8192
增加其配置,將其修改為65536。在兩個節點上執行:
# ndd -set /dev/udp udp_xmit_hiwat 65536
# ndd -set /dev/udp udp_recv_hiwat 65536
為了確保修改在重啟後仍然有效,新增/ect/init.d/nddudp檔案:
# vi /etc/init.d/nddudp
ndd -set /dev/udp udp_xmit_hiwat 65536
ndd -set /dev/udp udp_recv_hiwat 65536
然後在/etc的rc1.d、rc2.d、rcS.d目錄下建立連線,連線必須以S70或S71為字首:
# ln -s -f /etc/init.d/nddudp /etc/rc1.d/S70nddudp
# ln -s -f /etc/init.d/nddudp /etc/rc2.d/S70nddudp
# ln -s -f /etc/init.d/nddudp /etc/rcS.d/S70nddudp
注意,這裡Oracle文件給出的方法是錯誤的,在/etc/system目錄下設定這兩個引數是無效的。具體描述見:http://yangtingkun.itpub.net/post/468/271793
下面在兩個節點上建立ORACLE的安裝目錄和ORACLE的CRS安裝目錄:
# su - oracle
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001
$ mkdir -p /data/oracle/product/10.2
$ mkdir /data/oracle/oraInventory
$ mkdir /data/oracle/product/10.2/crs
$ mkdir /data/oracle/product/10.2/database
安裝的準備工作基本上告一段落,下面可以利用Oracle提供的檢驗工具cluvfy來檢查系統是否滿足要求:
將Oracle的cluster安裝檔案解壓,利用cpio –idmv < 10gr2_cluster_sol.cpio命令展開。然後進入展開目錄,進入cluvfy目錄執行下面的檢測命令:
$ cd cluster_disk
$ cd cluvfy
$ ./runcluvfy.sh comp nodereach -n racnode1,racnode2 -verbose
Verifying node reachability
Checking node reachability...
Check: Node reachability from node "racnode1"
Destination Node Reachable?
------------------------------------ ------------------------
racnode1 yes
racnode2 yes
Result: Node reachability check passed from node "racnode1".
Verification of node reachability was successful.
$ ./runcluvfy.sh comp nodecon -n racnode1,racnode2 -verbose
Verifying node connectivity
Checking node connectivity...
Interface information for node "racnode2"
Interface Name IP Address Subnet
------------------------------ ------------------------------ ------------
ce0 172.25.198.223 172.25.0.0
ce1 10.0.0.2 10.0.0.0
Interface information for node "racnode1"
Interface Name IP Address Subnet
------------------------------ ------------------------------ ------------
ce0 172.25.198.222 172.25.0.0
ce1 10.0.0.1 10.0.0.0
Check: Node connectivity of subnet "172.25.0.0"
Source Destination Connected?
------------------------------ ------------------------------ ------------
racnode2:ce0 racnode1:ce0 yes
Result: Node connectivity check passed for subnet "172.25.0.0" with node(s) racnode2,racnode1.
Check: Node connectivity of subnet "10.0.0.0"
Source Destination Connected?
------------------------------ ------------------------------ ------------
racnode2:ce1 racnode1:ce1 yes
Result: Node connectivity check passed for subnet "10.0.0.0" with node(s) racnode2,racnode1.
Suitable interfaces for the private interconnect on subnet "172.25.0.0":
racnode2 ce0:172.25.198.223
racnode1 ce0:172.25.198.222
Suitable interfaces for the private interconnect on subnet "10.0.0.0":
racnode2 ce1:10.0.0.2
racnode1 ce1:10.0.0.1
ERROR:
Could not find a suitable set of interfaces for VIPs.
Result: Node connectivity check failed.
Verification of node connectivity was unsuccessful on all the nodes.
這裡網路檢查時發現VIP的配置出現問題,這個是由於Oracle的bug造成的,這裡先忽略掉,後面會處理這個問題。
至此,作業系統的準備工作已經完成,下面準備安裝ORACLE的CLUSTERWARE軟體。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-69203/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Solaris8上安裝RAC10202環境(六)
- Solaris8上安裝RAC10202環境(四)
- Solaris8上安裝RAC10202環境(三)
- Solaris8上安裝RAC10202環境(二)
- CentOS上JETTY環境的配置安裝CentOSJetty
- 【Linux】LNMP 環境搭建(上):安裝篇LinuxLNMP
- [Linux] LNMP 環境搭建(上):安裝篇LinuxLNMP
- Clojure執行環境在windows上安裝Windows
- Solaris8安裝筆記筆記
- zabbix一鍵安裝lnmp環境LNMP
- LAMP一體環境快速安裝LAMP
- LNMP 環境安裝LNMP
- golang環境安裝Golang
- swoft環境安裝
- futter環境安裝
- 安裝LNMP環境LNMP
- 在Ubuntu上安裝Drone持續整合環境Ubuntu
- Infer 在 Mac 上的安裝和環境配置Mac
- 如何在Windows上安裝JAVA開發環境WindowsJava開發環境
- 在Ubuntu16.04上安裝LEMP環境Ubuntu
- Jenkins 一: 環境安裝以及配置Jenkins
- Windows 環境下 Python 環境安裝WindowsPython
- 如何在Ubuntu 20.04上安裝Unity桌面環境UbuntuUnity
- 在linux,windows上安裝rubyonrails開發環境LinuxWindowsAI開發環境
- Ubuntu 環境安裝 phpunitUbuntuPHP
- macOS 安裝 LNMP 環境MacLNMP
- brew lnmp 環境安裝LNMP
- dapr 環境安裝指南
- Windows 環境安裝LdapWindowsLDA
- Mac GO 環境安裝MacGo
- Pytorch環境安裝PyTorch
- Centos 安裝 erlang 環境CentOS
- zabbix環境安裝搭建
- PyOpenGl 1 -- 環境安裝
- zabbix安裝中文環境
- Windos環境安裝RocketMQMQ
- Windows環境安裝ScrapyWindows
- Debian環境中安裝git伺服器Gogs(上)Git伺服器Go