安裝Oracle11.2 RAC for Solaris10 sparc64(一)

yangtingkun發表於2011-03-22

簡單記錄一下Solaris 10Oracle 11.2 RAC環境的安裝過程。

這一篇描述環境準備工作。

 

 

以下所有操作除非特別宣告,否則都需要在兩個節點上進行配置。

首先在兩個節點上分別檢查記憶體情況:

# /usr/sbin/prtconf | grep "Memory size"
Memory size: 4096 Megabytes
# /usr/sbin/swap -s
總數:分配了 187048k 位元組 + 保留 24008k = 已使用 211056k5143752k 可用

如果要安裝RAC環境,也就是說Cluster和資料庫,要求記憶體不小於2.5G,雖然這臺Sun480已經老掉牙了,但是還能滿足安裝的最小要求。

SWAP分割槽至少1.5G,當然5G空間,也可以滿足。

# df -h
檔案系統               大小   用了   可用容量      掛接在
/dev/dsk/c2t0d0s0       29G   4.6G    24G    17%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   4.9G   696K   4.9G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                        29G   4.6G    24G    17%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                        29G   4.6G    24G    17%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   4.9G    88K   4.9G     1%    /tmp
swap                   4.9G    32K   4.9G     1%    /var/run
/dev/dsk/c2t0d0s7      2.6G   2.6M   2.5G     1%    /export/home
/dev/dsk/c0t500601603022E66Ad9s6
                       492G    70G   417G    15%    /data

檢查系統安裝空間,在/data目錄下有足夠的空間安裝RAC資料庫。

# df -h /tmp
檔案系統               大小   用了   可用容量      掛接在
swap                   4.9G    88K   4.9G     1%    /tmp

檢查臨時空間大小,CLUSTER的安裝和日後使用需要至少5.5G以上空間和1.5G以上的臨時空間。

在兩個節點上分別建立等同的使用者和組:

# groupadd -g 1000 oinstall
# groupadd -g 1031 dba
# mkdir /export/home/oracle
# useradd -u 1101 -g oinstall -G dba -d /export/home/oracle oracle
# chown -R oracle:oinstall /export/home/oracle
# passwd oracle

在兩個節點上分別建立CLUSTERORACLE的安裝目錄:

# mkdir /data/grid
# mkdir -p /data/oracle/product/11.2
# chown -R oracle:oinstall /data
# chmod -R 775 /data/

檢查作業系統版本和軟體包安裝情況:

# uname -r
5.10
# more /etc/release
Solaris 10 10/09 s10s_u8wos_08a SPARC
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 16 September 2009

Oracle要求的系統版本必須是U6以上,0810月之後的版本。

# pkginfo -i SUNWarc SUNWbtool SUNWcsl SUNWhea SUNWi1cs SUNWi15cs SUNWi1of SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWxwfnt
system      SUNWarc   Lint Libraries (usr)
system      SUNWbtool CCS tools bundled with SunOS
system      SUNWcsl   Core Solaris, (Shared Libs)
system      SUNWhea   SunOS Header Files
system      SUNWi1of  ISO-8859-1 (Latin-1) Optional Fonts
system      SUNWlibC  Sun Workshop Compilers Bundled libC
system      SUNWlibm  Math & Microtasking Library Headers & Lint Files (Usr)
system      SUNWlibms Math & Microtasking Libraries (Usr)
system      SUNWsprot Solaris Bundled tools
system      SUNWtoo   Programming Tools
system      SUNWxwfnt X Window System platform. required fonts
   
錯誤: 未發現"SUNWi1cs"的資訊
   
錯誤: 未發現"SUNWi15cs"的資訊

11.2要求Solaris10以上版本,對於缺少的SUNWi1csSUNWi15cs包,似乎在以前的版本安裝列表中也會出現,但是缺少這兩個包並不會導致安裝出現問題。

下面檢查一下補丁的情況,需要最小安裝下列的補丁:119963-14120753-06139574-03141414-02141444-09

# patchadd -p |grep 119963
Patch: 119963-16 Obsoletes: Requires: Incompatibles: Packages: SUNWlibC
# patchadd -p |grep 120753
Patch: 120753-07 Obsoletes: Requires: Incompatibles: Packages: SUNWlibmsr SUNWlibm
# patchadd -p |grep 139574
Patch: 139555-08 Obsoletes: 120062-01 121130-01 125551-02 126264-01 127743-02 127853-02 128253-01 128296-01 128318-01 128322-01 128340-01 128406-01 137095-01 137106-01 137278-01 138058-01 138106-02 138114-01 138231-01 138241-05 138397-01 138639-01 138850-01 138864-01 138878-01 138888-08 139385-02 139458-01 139459-01 139466-04 139483-05 139489-03 139492-01 139494-01 139498-04 139500-04 139502-03 139506-01 139551-01 139558-03 139560-02 139562-02 139566-01 139570-05 139571-01 139572-02 139574-03 139579-04 139931-01 139936-01 139938-01 139939-01 139942-01 139947-01 139951-01 139952-01 139960-02 139965-01 139994-01 140000-04 140076-02 140077-01 140142-01 140173-01 140194-04 140196-01 140197-01 140334-01 140389-01 140402-01 140411-01 140677-01 140679-01 140774-03 140776-01 140794-01 140855-01 141006-01 141008-01 Requires: 125555-02 118731-01 118833-36 118918-24 119042-09 119254-41 119578-30 120011-14 120900-04 121133-02 126897-02 127127-11 127755-01 137137-09 138217-01 140796-01 140899-01 141016-01 Incompatibles: Packages: SUNWcsu SUNWcsr SUNWcsl SUNWcakr FJSVhea SUNWkvm SUNWckr SUNWcsd SUNWpl5u SUNWesu SUNWperl584core SUNWcslr SUNWcpcu FJSVcpcu SUNWib SUNWibsdpib SUNWfmdr SUNWfmd FJSVfmd SUNWmdb FJSVmdb SUNWmdbr FJSVmdbr SUNWpiclu FJSVpiclu SUNWzfskr SUNWsmapi SUNWzfsr SUNWzfsu SUNWpool SUNWzoneu SUNWs8brandr SUNWtoo SUNWs9brandr SUNWssad SUNWudaplu SUNWtavor SUNWudapltu SUNWudfr SUNWmdr SUNWmdu SUNWipfh SUNWipfu SUNWopenssl-libraries SUNWwbsup SUNWnfsckr SUNWxcu4 SUNWiscsitgtr SUNWiscsitgtu SUNWloc SUNWbtool SUNWarc SUNWarcr SUNWnfssu SUNWdhcsu SUNWdmgtu SUNWcvcr SUNWfruip SUNWidn SUNWnxge SUNWsckmr SUNWsckmu SUNWus SUNWdtrc SUNWcry SUNWdcsr SUNWdtrp SUNWefcl SUNWncau SUNWhea SUNWopenssl-commands SUNWopenssl-include SUNWpd SUNWpdu SUNWrds SUNWsshcu SUNWroute SUNWsshdu SUNWsshu SUNWhermon
# patchadd -p |grep 141414
Patch: 141444-09 Obsoletes: 119143-02 120807-01 122754-01 123402-01 124924-01 125915-01 126266-01 126421-02 128004-01 128304-04 128306-05 128328-01 128334-01 128491-01 137021-03 137121-06 137129-06 137141-01 137289-02 137292-01 138044-02 138083-01 138104-01 138130-01 138174-04 138255-03 138269-02 138392-01 138625-02 138629-01 139386-02 139462-02 139464-01 139490-01 139881-01 139928-03 139956-01 139964-03 139973-01 139974-03 139977-07 139982-04 139985-02 139991-03 139993-03 139996-02 140150-01 140338-01 140408-01 140589-02 140916-02 140919-04 141028-01 141057-01 141414-10 141494-01 141510-03 141520-01 141524-03 141530-01 141538-01 141540-01 141546-01 141554-01 141556-01 141560-02 141690-02 141692-01 141694-02 141715-03 141721-03 141729-01 141731-01 141733-04 141736-05 141742-04 141743-04 141767-01 141770-01 141771-01 141775-01 141777-01 141781-02 141892-01 141894-01 141902-02 141908-01 141918-01 141920-03 141934-01 142004-01 142013-01 142051-01 142056-02 142246-01 142284-01 142479-01 142483-01 142489-01 Requires: 118833-36 118918-24 119042-09 119254-41 119578-30 120011-14 120900-04 121133-02 121901-01 121921-02 125503-02 126540-02 126897-02 127127-11 127755-01 137137-09 139555-08 142292-01 Incompatibles: Packages: SUNWcsu SUNWcsr SUNWcsl SUNWcar SUNWcakr FJSVhea SUNWkvm SUNWckr SUNWcsd SUNWpl5u SUNWesu SUNWperl584core SUNWcslr SUNWcpcu FJSVcpcu SUNWcryr SUNWib SUNWipoib SUNWibsdpib SUNWfmdr SUNWfmd FJSVfmd SUNWibsdpu SUNWmdb FJSVmdb SUNWmdbr FJSVmdbr SUNWpiclu FJSVpiclu SUNWzfskr SUNWsmapi SUNWzfsr SUNWzfsu SUNWpool SUNWzoneu SUNWtnfc SUNWtoo SUNWs9brandr SUNWssad SUNWigb SUNWusb SUNWudaplu SUNWtavor SUNWudapltu SUNWudapltr SUNWmdr SUNWmdu SUNWintgige SUNWio-tools SUNWopenssl-libraries SUNWwbsup SUNWnfsckr SUNWnfscr SUNWnfscu SUNWvolu SUNWrcmdc SUNWbcp SUNWxcu4 SUNWiscsitgtu SUNWixgbe SUNWbtool SUNWarc SUNWarcr SUNWnfssu SUNWpmu SUNWpmr SUNWdmgtu SUNWcpr SUNWefc SUNWfruip SUNWluxd SUNWnxge SUNWus SUNWatfsu SUNWdtrc SUNWcry SUNWefcl SUNWnfsskr SUNWftdur SUNWhea SUNWopenssl-commands SUNWopenssl-include SUNWpcmem SUNWpd SUNWpdu SUNWpl5v SUNWpsdpr SUNWrds SUNWsshcu SUNWrpcib SUNWs8brandu SUNWs9brandu SUNWsshdr SUNWsshdu SUNWsshu SUNWhermon

安裝所要求的補丁不是比系統中的低,就是被其他補丁替代,因此係統滿足安裝需要。

檢查作業系統架構:

# /bin/isainfo -kv
64-bit sparcv9 kernel modules

在兩個伺服器的/etc/hosts中,分別新增另外節點的主機名和IP地址:

# more /etc/hosts
#
# Internet host table
#
::1     localhost      
127.0.0.1       localhost      
172.25.198.222  racnode1        loghost
172.25.198.223  racnode2
10.0.0.1        racnode1-priv
10.0.0.2        racnode2-priv
172.25.198.200  racnode-cluster

節點1上啟用第二網路卡:

bash-3.00# ifconfig ce1 plumb
bash-3.00# ifconfig ce1 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255 up
# vi /etc/hostname.ce1
racnode1-priv

在節點2上啟用第二網路卡:

# 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

修改系統的引數限制:

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

/etc/system檔案中新增上面的配置。如果願意可以重新系統使配置生效,不過11gr2的安裝程式,可以自動調整系統的配置。

檢查系統TCPUDP埠範圍:

# /usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port
32768

65535
# /usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000

這是系統預設配置,應該將最小埠設定到9000,同樣UDP協議進行同樣的埠設定:

# /usr/sbin/ndd /dev/udp udp_smallest_anon_port udp_largest_anon_port
32768

65535
# /usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000

檢查並設定core檔案建立資訊:

# coreadm
   
全域性(主儲存器)資訊轉儲檔案模式:
    
全域性資訊轉儲檔案內容: default
      
初始(主儲存器)資訊轉儲檔案模式: core
      
初始資訊轉儲檔案內容: default
          
全域性(主儲存器)資訊轉儲: disabled
      
每程式的(主儲存器)資訊轉儲: enabled
    
全域性 setid (主儲存器)資訊轉儲: disabled
每程式的 setid (主儲存器)資訊轉儲: disabled
   
全域性(主儲存器)資訊轉儲記錄: disabled
# mkdir -p /var/cores
# coreadm -g /var/cores/%f.%n.%p.%t.core -e global -e global-setid -e log -d process -d proc-setid

11.2中,Oracle提供了CLUSTER節點間時間同步的服務,如果打算使用這個功能,就需要禁止ntp時間同步服務:

# /usr/sbin/svcadm disable ntp

11.2中,圖形化工具可以自動配置ssh網路連線,但是由於圖形介面的預設配置與Solaris系統不一致,需要新增下來的連結:

# mkdir /usr/local
# ln -s /etc/ssh /usr/local/etc
# ln -s /usr/bin /usr/local/bin

下面切換到oracle使用者,編輯shell啟動指令碼:

# su - oracle
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
$ echo $SHELL
/bin/sh
$ vi .profile
".profile"
[新檔案]
umask 022
DISPLAY=172.25.0.90:1.0
export DISPLAY

CLUSTER的安裝不需要ORACLE_HOMEORACLE_BASEORACLE_SID的設定。需要設定DISPLAY引數,好啟用圖形介面。

檢查程式和系統的限制:

$ ulimit -t
沒有限制
$ ulimit -f
沒有限制
$ ulimit -d
沒有限制
$ ulimit -s
8192
$ ulimit -n
256
$ ulimit -v
沒有限制

將下面的設定放到.profile中:

ulimit -s 32768
ulimit -n 65536

對於共享儲存裝置,需要對oracle使用者授權:

# chown oracle:oinstall /dev/rdsk/c0*

注意一點,各個節點的共享儲存磁碟路徑可能不一致,比如在節點2上,上面的授權變為:

# chown oracle:oinstall /dev/rdsk/c1*

至此,所有準備工作完成,可以利用圖形化工具進行安裝操作了。

 

 

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

相關文章