ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Solaris10下Silent模式安装Oracle1106RAC环境(一)

Solaris10下Silent模式安装Oracle1106RAC环境(一)

原创 Linux操作系统 作者:yangtingkun 时间:2009-01-21 22:04:52 0 删除 编辑

主机环境基本上和前面文章中描述的SOLARIS10安装Oracle1106rac的环境基本完全一致,最主要的区别在于没有了VOLUMN CLUSTER MANAGER,于是这里打算使用OracleASM。由于安装操作没有什么区别,所以这次安装选择了SILENT静默模式来安装RAC

首先设置操作系统环境信息。

 

 

根据Oraclemetalink产品验证列表,Solaris10支持Oracle11g for Sparc 64bit

首先验证系统硬件是否满足需要,在两台服务器上分别执行上面的检查语句:

root@ser1 # /usr/sbin/prtconf | grep "Memory size"
Memory size: 32768 Megabytes
root@ser1 # /usr/sbin/swap -s
total: 176224k bytes allocated + 29520k reserved = 205744k used, 58981880k available
root@ser1 # df -k /tmp
Filesystem            kbytes    used   avail capacity  Mounted on
swap                 58980232      40 58980192     1%    /tmp
root@ser1 # df -k /
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d10      73621232 4388386 68496634     7%    /

检查操作系统版本和包信息:

root@ser1 # uname -r
5.10
root@ser1 # pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs 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
ERROR: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found

缺少两个包SUNWi1csSUNWi15cs,根据以往安装经验,不安装这两个包也可以顺利安装Oracle,由于是测试数据库,所以先忽略这两个包。

检查系统的patch安装情况:

root@ser1 # /usr/sbin/patchadd -p | grep 127111
Patch: 127111-11 Obsoletes: 118557-09 118562-14 118843-01 121290-03 123398-02 123564-01 125016-02 125043-01 125122-01 125196-05 125202-01 125251-02 125380-02 125382-01 126432-01 126665-01 127716-01 127730-04 127741-01 127745-01 127747-01 127749-03 127750-01 127753-02 127757-01 Requires: 118833-36 118918-24 119578-30 120011-14 120900-04 125369-13 125476-02 126540-02 126897-02 Incompatibles: Packages: SUNWcsu SUNWcsr SUNWcsl FJSVhea SUNWcakr SUNWckr SUNWcsd SUNWesu SUNWtoo SUNWusb SUNWopenssl-libraries SUNWnfsckr SUNWcslr SUNWhea SUNWnisu SUNWypr SUNWypu SUNWzoneu SUNWfmd FJSVfmd SUNWmdb FJSVmdb SUNWmdbr FJSVmdbr SUNWpiclu SUNWnfssu SUNWcpc SUNWcpr SUNWefc SUNWdrcr SUNWdrr SUNWbtool SUNWarcr SUNWnxge SUNWdtrc SUNWcry SUNWcryr SUNWcstl SUNWpsu SUNWdcar SUNWdtrp

如果不需要安装PRO*COCI之类的开发工具,Solaris10只需要保证补丁127111的版本大于127111-02即可。如果需要安装这些开发工具,还需要检查下面几个补丁:117837-05117846-08118682-01

下面为两个节点分别建立Oracle用户和相应的组。首先在节点1上:

root@ser1 # groupadd oinstall
root@ser1 # groupadd dba
root@ser1 # mkdir -p /export/home/oracle
root@ser1 # useradd -g oinstall -G dba -d /export/home/oracle oracle
root@ser1 # mkdir /data
root@ser1 # chown -R oracle:oinstall /export/home/oracle
root@ser1 # chown -R oracle:oinstall /data
root@ser1 # passwd oracle
New Password:
Re-enter new Password:
passwd: password successfully changed for oracle
root@ser1 # id oracle
uid=100(oracle) gid=100(oinstall)
root@ser1 # 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:
postgres::90:
nobody::60001:
noaccess::60002:
nogroup::65534:
oinstall::100:
dba::101:oracle
root@ser1 # id nobody
uid=60001(nobody) gid=60001(nobody)

根据上面的结果在节点2上建立用户和组:

root@ser2 # groupadd -g 100 oinstall
root@ser2 # groupadd -g 101 dba
root@ser2 # mkdir -p /export/home/oracle
root@ser2 # useradd -u 100 -g oinstall -G dba -d /export/home/oracle oracle
root@ser2 # chown -R oracle:oinstall /export/home/oracle
root@ser2 # mkdir /data
root@ser2 # chown -R oracle:oinstall /data   
root@ser2 # passwd oracle
New Password:
Re-enter new Password:
passwd: password successfully changed for oracle
root@ser2 # id nobody
uid=60001(nobody) gid=60001(nobody)

下面分别为两个节点的用户建立环境变量,编辑.profile文件为节点1添加下面的内容。

umask 022
ORACLE_SID=rac11g1
export ORACLE_SID
ORACLE_BASE=/data/oracle
export ORACLE_BASE
ORACLE_HOME=/data/oracle/product/11.1/database
export ORACLE_HOME
NLS_LANG='SIMPLIFIED CHINESE_CHINA.ZHS16GBK'
export NLS_LANG
PATH=$PATH:$ORACLE_HOME/bin
export PATH
DISPLAY=172.25.8.201:1.0
export DISPLAY

同样的操作在节点2上执行,将ORACLE_SID的变量替换为rac11g2

下面为两个节点设置IPVIRTUAL-IPPRIVATE-IP,编辑/etc/hosts文件,在两个节点分别添加下面的内容:

127.0.0.1       localhost
172.0.2.62      ser1    ser1.   loghost
172.0.2.63      ser2
172.0.2.68      ser1-vip
172.0.2.69      ser2-vip
10.0.2.1        ser1-priv
10.0.2.2        ser2-priv

下面需要配置SSH访问,首先检查两个数据库上是否安装了SSH

root@ser1 # pgrep sshd
7699
478
7702

下面切换到oracle用户,确保oracle的当前目录权限不超过750

root@ser1 # su - oracle
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
$ ls -al
total 8
drwxr-xr-x   2 oracle   oinstall     512 Aug 12 17:18 .
drwxr-xr-x   3 root     root         512 Aug 11 11:25 ..
-rw-------   1 oracle   oinstall     117 Aug 12 17:18 .bash_history
-rw-r--r--   1 oracle   oinstall     299 Aug 12 16:38 .profile
$ chmod 750 .
$ ls -al
total 8
drwxr-x---   2 oracle   oinstall     512 Aug 12 17:18 .
drwxr-xr-x   3 root     root         512 Aug 11 11:25 ..
-rw-------   1 oracle   oinstall     117 Aug 12 17:18 .bash_history
-rw-r--r--   1 oracle   oinstall     299 Aug 12 16:38 .profile

创建ssh报错key所需的目录:

$ mkdir .ssh
$ chmod 700 .ssh

产生key文件,指定默认存放位置,并设置一个密码:

$ 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:
6e:70:93:96:8a:59:a6:b4:fb:2e:ad:60:f3:c6:02:92 oracle@ser1

在另一个节点上重复同样的操作。

下面进行.ssh目录,添加id_rsa.pub到文件authorized_keys文件中,并通过scp拷贝到节点2

$ pwd
/export/home/oracle
$ cd .ssh
$ ls
id_rsa      id_rsa.pub
$ cat id_rsa.pub >> authorized_keys
$ ls
authorized_keys  id_rsa           id_rsa.pub
$ scp authorized_keys ser2:/export/home/oracle/.ssh/
The authenticity of host 'ser2 (172.0.2.63)' can't be established.
RSA key fingerprint is e3:18:c8:7d:c2:89:f1:e7:3a:fa:5c:93:8b:ba:99:43.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ser2,172.0.2.63' (RSA) to the list of known hosts.
Password:
authorized_keys      100% |*********************************************************************************|   221       00:00   

通过ssh登陆节点2,进行.ssh目录,添加id_rsa.pubauthorized_keys文件,并将这个文件通过scp拷贝并覆盖节点1上的文件:

$ ssh ser2
Enter passphrase for key '/export/home/oracle/.ssh/id_rsa':
Last login: Mon Aug 18 17:22:45 2008 from ser1
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
$ cd .ssh
$ cat id_rsa.pub >> authorized_keys
$ ls
authorized_keys  id_rsa           id_rsa.pub
$ scp authorized_keys ser1:/export/home/oracle/.ssh/
The authenticity of host 'ser1 (172.0.2.62)' can't be established.
RSA key fingerprint is 5d:bc:31:12:68:30:5a:30:8d:f5:46:2b:4a:6e:ef:fb.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ser1,172.0.2.62' (RSA) to the list of known hosts.
Password:
authorized_keys      100% |*********************************************************************************|   442       00:00   

确认两个节点上的authorized_keys文件中已经包含了2个节点的rsa信息:

$ more authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAymgz0aIOGDGXjbrEtksl/OE5OIVzLOxZSlbgOd7eO5j4Eq98WfJ6ow1jb46LPi1264p1jE/y5htceQskn9kYlsunWS59kjh2
1AXxqh54KQhZ6xccbHBgtfKX6dzZdoRxPmXZh+JnGlZSDqEjaQsORwAhQmH4BnrfVnOnHlPa2jM= oracle@ser1
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEArdCz98s7vqMVywt27cTVi9z3VUEv0c1K3c0rZRdA2Z4td/GhC/zzi1w1OeIp6dXEE5UUhHWtEEc2SJaargt3J7GrEEvt+na6
/6AcIdOPY3CFugFq4ov4qU8MN6zuBAuVr24HBh//dGQkZGx/6WA+1djMqa2BszNKgqxpdTBSSUU= oracle@ser2
$ exit
Connection to ser2 closed.
$ more authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAymgz0aIOGDGXjbrEtksl/OE5OIVzLOxZSlbgOd7eO5j4Eq98WfJ6ow1jb46LPi1264p1jE/y5htceQskn9kYlsunWS59kjh2
1AXxqh54KQhZ6xccbHBgtfKX6dzZdoRxPmXZh+JnGlZSDqEjaQsORwAhQmH4BnrfVnOnHlPa2jM= oracle@ser1
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEArdCz98s7vqMVywt27cTVi9z3VUEv0c1K3c0rZRdA2Z4td/GhC/zzi1w1OeIp6dXEE5UUhHWtEEc2SJaargt3J7GrEEvt+na6
/6AcIdOPY3CFugFq4ov4qU8MN6zuBAuVr24HBh//dGQkZGx/6WA+1djMqa2BszNKgqxpdTBSSUU= oracle@ser2

分别在两个节点执行下面的命令,添加节点的PUBLIC名称到已知主机命令列表之中:

$ ssh ser1 date
The authenticity of host 'ser1 (172.0.2.62)' can't be established.
RSA key fingerprint is 5d:bc:31:12:68:30:5a:30:8d:f5:46:2b:4a:6e:ef:fb.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ser1,172.0.2.62' (RSA) to the list of known hosts.
Enter passphrase for key '/export/home/oracle/.ssh/id_rsa':
Mon Aug 18 17:32:55 CST 2008
$ ssh ser2 date
Enter passphrase for key '/export/home/oracle/.ssh/id_rsa':
Mon Aug 18 17:34:56 CST 2008

在两个节点分别执行下面的操作,将密码添加到agent中:

$ exec ssh-agent $SHELL
$ 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)

下面在两个节点分别输入下面的命令,验证ssh是否配置正确:

$ ssh ser1 date
Mon Aug 18 17:40:11 CST 2008
$ ssh ser2 date
Mon Aug 18 17:41:08 CST 2008

如果不出现密码提示,说明已经正确的完成了ssh的配置。

下面分别设置两个节点的默认网关,编辑/etc/defaultrouter添加默认网关:

172.0.2.252

为两个节点添加PRIVATE-IP

root@ser1 # ifconfig ce1 plumb
root@ser1 # ifconfig ce1 10.0.2.1 netmask 255.255.255.0 broadcast 10.0.2.255 up

编辑两个节点的/etc/hostname.ce1,分别添加private_ip地址对应的主机名:

ser1-priv

下面编辑两个节点的/etc/netmasks,分别添加private_ip的子网掩码和广播地址信息:

10.0.2.0        255.255.255.0

在两个节点分别检查nscd进程是否启动,如果没有启动可以使用/etc/init.d/nscd start来进行启动:

root@ser1 # ps -ef | grep nscd | grep -v grep
    root   177     1   0   Aug 06 ?           0:12 /usr/sbin/nscd

在两个节点分别检查udp协议配置:

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

由于设置接近Oracle的推荐值,这里就不需要进行修改。

在两个节点利用Oracle用户,建立Oracle的安装目标:

bash-3.00$ mkdir -p /data/oracle/product/11.1/database
bash-3.00$ mkdir /data/oracle/product/11.1/crs
bash-3.00$ mkdir /data/oracle/oraInventory

最后分别设置两个系统的内核参数,修改/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

然后重启系统,安装准备工作告一段落。

由于两个服务器上面的系统时间有差别,应该利用操作系统命令date将二者时间调整一致。

 

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

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

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10524404