Oracle10203RAC環境新增新節點(一)

yangtingkun發表於2009-11-15

簡單描述一下,在Oracle 10203 for Solaris sparcRAC雙節點環境中,新增一個節點的過程。共享儲存已經在第三個節點上配置完成,這裡主要介紹作業系統上和Oracle上的配置。

這一篇介紹準備過程。

 

 

首先是將主機的IP地址,調整到RAC伺服器IP地址附近,方便管理。修改目標主機IP地址到172.25.198.226

# ifconfig ce0 172.25.198.226 netmask 255.255.0.0 broadcast 172.25.255.255

然後修改/etc/hosts檔案中的IP地址。

下面將主機名也修改為配套的主機名資訊racnode3

# hostname       
supingsol
# hostname racnode3

利用hostname設定主機名後,還要分別修改/etc/hosts/ect/nodename/etc/hostname.ce0/etc/net/ticlts/hosts/etc/net/ticots/hosts/etc/net/ticotsord/hosts6個檔案:

# more /etc/hosts
#
# Internet host table
#
127.0.0.1       localhost      
172.25.198.226  racnode3        loghost
192.168.192.109 rw     
# more /etc/nodename
racnode3
# more /etc/hostname.ce0
racnode3
# more /etc/net/ticlts/hosts
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)hosts      1.3     03/12/07 SMI"
#
# NOTE: This file is no longer consulted and may be removed from a future
#       release of Solaris.
#
racnode3
# more /etc/net/ticots/hosts
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)hosts      1.3     03/12/07 SMI"
#
# NOTE: This file is no longer consulted and may be removed from a future
#       release of Solaris.
#
racnode3
# more /etc/net/ticotsord/hosts
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)hosts      1.3     03/12/07 SMI"
#
# NOTE: This file is no longer consulted and may be removed from a future
#       release of Solaris.
#
racnode3

下面新增使用者和組資訊,根據RAC節點的組資訊和使用者資訊在當前節點建立使用者和組:

# 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
# mkdir /data
# chown -R oracle:oinstall /data
# id nobody
uid=60001(nobody) gid=60001(nobody)
# passwd oracle

Oracle使用者登陸,設定環境變數:

# su - oracle
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
$ vi .profile
".profile"
[新檔案]
umask 022
ORACLE_SID=testrac3
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

修改/etc/hosts檔案新增public id, private idvitual id

# vi /etc/hosts
"/etc/hosts"
[只讀取] 13 行,300 字元
#
# Internet host table
#
127.0.0.1       localhost
172.25.198.226 racnode3 loghost
172.25.198.227 racnode3-vip
10.0.0.3 racnode3-priv
172.25.198.222 racnode1
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

在其他兩個節點,分別新增下面的內容:

172.25.198.226 racnode3
172.25.198.227 racnode3-vip
10.0.0.3 racnode3-priv

在節點1、節點2和當前節點,編輯/export/home/oracle/.rhosts檔案,內容如下:

racnode1
racnode1-vip
racnode1-priv
racnode2
racnode2-vip
racnode2-priv
racnode1
racnode1-vip
racnode1-priv
racnode2
racnode2-vip
racnode2-priv
racnode3
racnode3-vip
racnode3-priv

在當前伺服器上,新增PRIVATE IP地址:

# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
ce0: flags=1000843 mtu 1500 index 2
        inet 172.25.198.226 netmask ffff0000 broadcast 172.25.255.255
        ether 0:3:ba:2c:d8:da
# ifconfig ce1 plumb
# ifconfig ce1 10.0.0.3 netmask 255.255.255.0 broadcast 10.0.0.255 up

為了啟動後,ce1可以自動配置,編輯/etc/hostname.ce1檔案:

racnode3-priv

然後新增相應的掩碼和廣播地址,在/etc/netmasks檔案後面新增:

10.0.0.0        255.255.0.0

另外需要新增預設的閘道器/etc/defaultrouter

172.25.13.1

檢查nscd程式是否啟動:

# ps -ef|grep nscd
    root   162     1   0   3
12 ?           1:13 /usr/sbin/nscd
    root  4498  4418   0 17:33:49 pts/1       0:00 grep nscd

如果沒有啟動,可以使用/etc/init.d/nscd start來啟動。

在兩個節點上下面檢查軟體包是否都已經安裝:

# uname -r
5.10
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWxwfnt
system      SUNWarc   Lint Libraries (usr)
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  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

編輯/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=21474836479
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10

檢查UDP協議配置:

# ndd /dev/udp udp_xmit_hiwat
57344
# ndd /dev/udp udp_recv_hiwat
57344

這個值已經很接近Oracle的推薦值了,這裡就不修改了。

下面重啟系統,安裝的準備工作到此結束。

# init 6

 

 

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

相關文章