ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Solaris8上安装RAC10202环境(一)

Solaris8上安装RAC10202环境(一)

原创 Linux操作系统 作者:yangtingkun 时间:2007-03-15 00:00:00 0 删除 编辑

前一阵一直在测试ORACLE 10R2RAC环境在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的步骤:

安装补丁的下载地址是:http://sunsolve.sun.com/private-cgi/show.pl?target=patches/patch-access

选择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检查系统的架构,当前芯片是64SPARC

系统满足安装需要,下面可以创建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的用户iddbaoinstall的组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

分别在racnode1racnode2上编辑oracle用户下的/export/home/oracle/.rhosts文件,添加如下内容:

$ vi .rhosts
racnode1
racnode1-vip
racnode1-priv
racnode2
racnode2-vip
racnode2-priv

下面为系统添加私有IP地址:

# ifconfig -a
lo0: flags=1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843 mtu 1500 index 2
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

这是racnode1oracle用户下将看到:

$ 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

然后在/etcrc1.drc2.drcS.d目录下建立连接,连接必须以S70S71为前缀:

# 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的安装目录和ORACLECRS安装目录:

# 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来检查系统是否满足要求:

Oraclecluster安装文件解压,利用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的配置出现问题,这个是由于Oraclebug造成的,这里先忽略掉,后面会处理这个问题。

至此,操作系统的准备工作已经完成,下面准备安装ORACLECLUSTERWARE软件。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/4227/viewspace-69203/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10386114