Solaris10下安装Oracle10203RAC环境(一)

前一阵刚刚才测试环境下装完Solaris 8下的ORACLE RAC。结果发现这次采购的F490硬件居然不支持Solaris 8。只好将操作系统升级到Solaris 10

前面已经对Solaris 8下的安装进行了比较详细的描述,这里只是简单记录一下Solaris 10下的安装步骤。和8类似的步骤会简单带过。


首先是建立用户:

在第一个节点:

root@ahrac1 # groupadd oinstall
root@ahrac1 # groupadd dba
root@ahrac1 # mkdir -p /export/home/oracle
root@ahrac1 # useradd -g oinstall -G dba -d /export/home/oracle oracle
root@ahrac1 # chown oracle:oinstall /export/home/oracle
root@ahrac1 # mkdir /data
root@ahrac1 # chown oracle:oinstall /data
root@ahrac1 # passwd oracle

root@ahrac1 # id nobody
uid=60001(nobody) gid=60001(nobody)
root@ahrac1 # id oracle
uid=101(oracle) gid=101(oinstall)
root@ahrac1 # more /etc/group
root::0:
other::1:root
bin::2:root,daemon
sys::3:root,bin,adm
adm::4:root,daemon
uucp::5:root
mail::6:root
tty::7:root,adm
lp::8:root,adm
nuucp::9:root
staff::10:
daemon::12:root
sysadmin::14:
smmsp::25:
gdm::50:
webservd::80:
nobody::60001:
noaccess::60002:
nogroup::65534:
test::100:
oinstall::101:
dba::102:oracle

在节点二:

root@ahrac2 # groupadd -g 101 oinstall
root@ahrac2 # groupadd -g 102 dba
root@ahrac2 # mkdir -p /export/home/oracle
root@ahrac2 # useradd -u 101 -g oinstall -G dba -d /export/home/oracle oracle
root@ahrac2 # chown oracle:oinstall /export/home/oracle
root@ahrac2 # mkdir /data
root@ahrac2 # chown oracle:oinstall /data
root@ahrac2 # id nobody
uid=60001(nobody) gid=60001(nobody)
root@ahrac2 # passwd oracle

设置两个节点的环境变量,注意节点二的环境变量中的ORACLE_SIDtradedb2

root@ahrac1 # su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ vi .profile
umask 022
ORACLE_SID=tradedb1
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

再上一篇文章中,介绍了通过rcp的方式配置远端访问方式,这篇给出配置ssh的方式。首先在两个节点上执行下面的操作,产生ssh命令所需的key文件:

root@ahrac1 # su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ mkdir .ssh
$ chmod 700 .ssh
$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/oracle/.ssh/id_rsa.
Your public key has been saved in /export/home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
64:0a:45:ce:a6:de:8b:f7:ba:b3:15:87:38:46:f6:c7 oracle@ahrac1
$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_rsa):
/export/home/oracle/.ssh/id_rsa already exists.
Overwrite (yes/no)? no
$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/oracle/.ssh/id_dsa.
Your public key has been saved in /export/home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
4f:58:55:da:5a:f1:11:3c:07:bb:84:44:1b:23:96:f0 oracle@ahrac1

$ touch .ssh/authorized_keys
$ cd .ssh
$ ls
authorized_keys id_dsa id_dsa.pub id_rsa id_rsa.pub

产生了key之后,利用ssh命令将key添加到authorized_keys文件中,并拷贝到节点二:

$ ssh ahrac1 cat /export/home/oracle/.ssh/id_rsa.pub >> authorized_keys
The authenticity of host 'ahrac1 (172.25.198.42)' can't be established.
RSA key fingerprint is 29:d2:ab:dc:ff:a3:24:70:14:7a:8e:70:01:f7:be:46.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ahrac1,172.25.198.42' (RSA) to the list of known hosts.
Password:
$ ssh ahrac1 cat /export/home/oracle/.ssh/id_dsa.pub >> authorized_keys
Enter passphrase for key '/export/home/oracle/.ssh/id_rsa':
$ ssh ahrac2 cat /export/home/oracle/.ssh/id_rsa.pub >> authorized_keys
The authenticity of host 'ahrac2 (172.25.198.43)' can't be established.
RSA key fingerprint is 74:55:ef:49:2b:f4:a0:2c:52:44:83:09:ac:fb:b1:1b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ahrac2,172.25.198.43' (RSA) to the list of known hosts.
Password:
$ ssh ahrac2 cat /export/home/oracle/.ssh/id_dsa.pub >> authorized_keys
Password:
$ scp authorized_keys ahrac2:/export/home/oracle/.ssh/
Enter passphrase for key '/export/home/oracle/.ssh/id_rsa':
authorized_keys 100% |*********************************************************************************| 1652 00:00

操作完成后,在节点二上重复这个步骤,将最终的authorized_keys拷贝回节点一。

然后在两个节点上分别修改authorized_keys的文件属性:

$ chmod 600 authorized_keys

为了ssh命令执行的时候不输入密码验证,在需要启动安装程序的节点进行如下的设置(这个操作在重启后失效,需要重启系统后手工执行这个步骤)

$ exec /usr/bin/ssh-agent $SHELL
$ /usr/bin/ssh-add
Enter passphrase for /export/home/oracle/.ssh/id_rsa:
Identity added: /export/home/oracle/.ssh/id_rsa (/export/home/oracle/.ssh/id_rsa)
Enter passphrase for /export/home/oracle/.ssh/id_dsa:
Identity added: /export/home/oracle/.ssh/id_dsa (/export/home/oracle/.ssh/id_dsa)

下面可以验证一下是否不需要输入密码执行ssh命令:

$ ssh ahrac1 date
Mon Mar 26 15:56:06 CST 2007
$ ssh ahrac2 date
Mon Mar 26 15:55:13 CST 2007

网络配置部分完成,下面检查系统的硬件是否满足安装需要:

root@ahrac1 # /usr/sbin/prtconf | grep "Memory size"
Memory size: 32768 Megabytes
root@ahrac1 # /usr/sbin/swap -s
total: 298240k bytes allocated + 60184k reserved = 358424k used, 60398552k available
root@ahrac1 # df -k /tmp
Filesystem kbytes used avail capacity Mounted on
swap 60397080 224 60396856 1% /tmp
root@ahrac1 # /bin/isainfo -kv
64-bit sparcv9 kernel modules

内容需要1G以上,如果内存小于2G,则swap空间至少是内存的1.5倍,内存大于2G,则swap空间最小和内存大小相同。/tmp目录需要至少400M空间。安装Oracle的目录至少需要5.2G以上的空间。使用isainfo检查系统的架构,当前芯片是64SPARC

在两个节点下分别0修改/etc/hosts文件,添加public ipprivate ip,和vip

root@ahrac1 # vi /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
172.25.198.42 ahrac1 loghost
172.25.198.44 ahrac1-vip
10.0.0.3 ahrac1-priv
172.25.198.43 ahrac2
172.25.198.45 ahrac2-vip
10.0.0.4 ahrac2-priv

在两个节点上添加默认的路由:

vi /etc/defaultrouter
172.25.2.1

添加主键的PRIVATE IP

root@ahrac1 # ifconfig ce1 plumb
root@ahrac1 # ifconfig ce1 10.0.0.3 netmask 255.255.255.0 broadcast 10.0.0.255 up
root@ahrac1 # vi /etc/hostname.ce1
ahrac1-priv

另一个节点执行类似的操作,添加其PRIVATE IP

修改两个节点的默认子网掩码,将第二IP的掩码信息加入:

root@ahrac2 # vi /etc/netmasks
"/etc/netmasks" [Read only] 15 lines, 379 characters
#
# 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.
#
# 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

检查ncsd进程已经启动:

root@ahrac1 # ps -ef|grep nscd
root 164 1 0 Mar 23 ? 0:10 /usr/sbin/nscd
root 16748 29168 0 16:24:45 pts/2 0:00 grep nscd

如果没有启动,可以使用/etc/init.d/nscd start来启动。

下面检查系统的软件是否满足安装RAC的需要,检查系统包是否安装完毕:

root@ahrac1 # uname -a
SunOS ahrac1 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V490

root@ahrac1 # 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文件:

root@ahrac1 # vi /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协议的配置:

root@ahrac1 # ndd /dev/udp udp_xmit_hiwat
57344
root@ahrac1 # ndd /dev/udp udp_recv_hiwat
57344

Solaris在这里进行了优化,这个值已经很接近Oracle的推荐值了,这里就不修改了。

下面重启系统,安装的准备工作到此结束。

root@ahrac1 # init 6

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

转载于:http://blog.itpub.net/4227/viewspace-69227/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值