代码改变世界

HP-UX 11g RAC安装 记录

2016-07-12 15:44  AlfredZhao  阅读(2062)  评论(0编辑  收藏  举报

环境:HP-UX 11.31 + GI 11.2.0.4 + Oracle 11.2.0.4
背景:本文只对HP-UX平台安装11g RAC环境过程中,针对一些跟Linux平台有差异的地方进行简单记录备忘。
关于安装部署11g RAC的完整过程可参考:http://www.cnblogs.com/jyzhao/p/4679203.html

  1. 查看网络
  2. 新建用户
  3. 异步I/O
  4. 手动配置互信
  5. 预安装检查
  6. xterm图形化
  7. ASM磁盘组权限
  8. scan IP修改

1. 查看网络

netstat -in

2. 新建用户

新建用户的默认用户目录是需要手工赋权和指定的,比如:
mkdir -p /home/grid
mkdir -p /home/oracle
chown grid:oinstall /home/grid
chown oracle:oinstall /home/oracle

useradd -g oinstall -G asmadmin,asmdba,asmoper -u 700 -d /home/grid grid  
useradd -g oinstall -G dba,asmdba,oper         -u 800 -d /home/oracle oracle

3. 异步I/O

开启异步I/O,查看/dev/async的信息:
root@rnopdb01:/dev/rdisk #ll /dev/async 
crw-rw-rw-   1 bin        bin        101 0x000000 Mar 15 12:53 /dev/async
root@rnopdb01:/dev/rdisk #
root@rnopdb01:/dev/rdisk #
root@rnopdb01:/dev/rdisk #
root@rnopdb01:/dev/rdisk #
root@rnopdb01:/dev/rdisk #rm /dev/async
root@rnopdb01:/dev/rdisk # /sbin/mknod /dev/async c 101 0x4
root@rnopdb01:/dev/rdisk #chmod 666 /dev/async
root@rnopdb01:/dev/rdisk #ll /dev/async 
crw-rw-rw-   1 root       sys        101 0x000004 Mar 19 11:11 /dev/async

4. 手动配置互信

grid用户配置互信:
1).在主节点rnopdb01上grid用户下,ssh-keygen生成密钥
# su – grid
$ mkdir ~/.ssh
$ ssh-keygen -t rsa
$ ssh-keygen -t dsa

2).在节点rnopdb02上执行相同的操作,确保通信无阻

# su – grid
$ mkdir ~/.ssh
$ ssh-keygen -t rsa
$ ssh-keygen -t dsa

3).在主节点rnopdb01上grid用户执行以下操作
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ ssh rnopdb02 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh rnopdb02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ scp ~/.ssh/authorized_keys rnopdb02:~/.ssh/authorized_keys

ssh rnopdb01
ssh rnopdb02

oracle用户配置互信方法同上。

5. 预安装检查

./runcluvfy.sh stage -pre crsinst -n rnopdb01,rnopdb02 -verbose

保证一切通过即ok。

Check: Kernel parameter for "tcp_smallest_anon_port" 
  Node Name     Current                   Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  rnopdb02      49152                     9000                      failed (ignorable)
  rnopdb01      49152                     9000                      failed (ignorable)
Result: Kernel parameter check failed for "tcp_smallest_anon_port"

Check: Kernel parameter for "tcp_largest_anon_port" 
  Node Name     Current                   Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  rnopdb02      65535                     65500                     failed (ignorable)
  rnopdb01      65535                     65500                     failed (ignorable)
Result: Kernel parameter check failed for "tcp_largest_anon_port"

Check: Kernel parameter for "udp_smallest_anon_port" 
  Node Name     Current                   Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  rnopdb02      49152                     9000                      failed (ignorable)
  rnopdb01      49152                     9000                      failed (ignorable)
Result: Kernel parameter check failed for "udp_smallest_anon_port"

Check: Kernel parameter for "udp_largest_anon_port" 
  Node Name     Current                   Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  rnopdb02      65535                     65500                     failed (ignorable)
  rnopdb01      65535                     65500                     failed (ignorable)
Result: Kernel parameter check failed for "udp_largest_anon_port"


--solution
tcp_smallest_anon_port

kctune -h -B tcp_smallest_anon_port="9000"
kctune -h -B tcp_largest_anon_port="65500"
kctune -h -B udp_smallest_anon_port="9000"
kctune -h -B udp_largest_anon_port="65500"

> 有时候在调整内核参数的时候会提示如下的错误:
> ERROR:   The tunable 'maxswapchunks' is not known.
> 一般是由于内核参数没有该项造成的,我们可以使用#kctune -u maxswapchunks="16384"来增加,下次启动后就会生效。

kctune -u tcp_smallest_anon_port="9000"
kctune -u tcp_largest_anon_port="65500"
kctune -u udp_smallest_anon_port="9000"
kctune -u udp_largest_anon_port="65500"

6. xterm图形化

在xterm工具中,HP-UX需要选择CDE。

7. ASM磁盘组权限

对于grid和oracle分开安装的Oracle系统, 建议设置ASM磁盘为grid:oinstall,权限设置为660。比如:
chown grid:oinstall disk1001
chown grid:oinstall disk1002
chown grid:oinstall disk1003
...

chmod 660 disk1001
chmod 660 disk1002
chmod 660 disk1003
...

8. scan IP修改

若后续有修改scan IP的需求, 参考文档 ID 972500.1
--1. As grid user stop resources:

$ $GRID_HOME/bin/srvctl stop scan_listener
$ $GRID_HOME/bin/srvctl stop scan

然后修改/etc/hosts文件中SCAN IP Lable对应的IP地址

--2. As root user modify SCAN:

# $GRID_HOME/bin/srvctl modify scan -n pay-scan.us.oracle.com  

--3. As grid user modify and start resources:

$ $GRID_HOME/bin/srvctl modify scan_listener -u
$ $GRID_HOME/bin/srvctl start scan_listener

--4. To confirm the change

$ $GRID_HOME/bin/srvctl config scan
SCAN name: pay-scan.us.oracle.com, Network: 1/10.4.0.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /10.4.0.201/120.0.0.201
SCAN VIP name: scan2, IP: /10.4.0.202/120.0.0.202
SCAN VIP name: scan3, IP: /10.4.0.203/120.0.0.203

$ $GRID_HOME/bin/srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521