RHEL5 Oracle 11G R2 RAC 静默安装 (一) GI安装前 准备

一,安装前准备
1, 组和用户创建 (每个节点)

点击(此处)折叠或打开

  1. [root@huy1 ~]# groupadd -g 200 oinstall
  2. [root@huy1 ~]# groupadd -g 201 dba
  3. [root@huy1 ~]# groupadd -g 202 oper
  4. [root@huy1 ~]# groupadd -g 204 asmoper
  5. [root@huy1 ~]# groupadd -g 205 asmdba
  6. [root@huy1 ~]# useradd -u 200 -g oinstall -G dba,asmdba,oper oracle
  7. [root@huy1 ~]# useradd -u 201 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
  8. [root@huy1 ~]# passwd grid
  9. [root@huy1 ~]# passwd oracle
2, 用户目录创建(每个节点)

点击(此处)折叠或打开

  1. [root@huy1 ~]# mkdir -p /u01/app/oraInventory
  2. [root@huy1 ~]# chown -R grid:oinstall /u01/app/oraInventory/
  3. [root@huy1 ~]# chmod -R 775 /u01/app/oraInventory/
  4. [root@huy1 ~]# mkdir -p /u01/11.2.0/grid
  5. [root@huy1 ~]# chown -R grid:oinstall /u01/11.2.0/grid/
  6. [root@huy1 ~]# chmod -R 775 /u01/11.2.0/grid/
  7. [root@huy1 ~]# mkdir -p /u01/app/oraInventory/
  8. [root@huy1 ~]# mkdir -p /u01/app/oracle
  9. [root@huy1 ~]# mkdir -p /u01/app/oracle/cfgtoollogs
  10. [root@huy1 ~]# mkdir -p /u01/app/oracle/product/11.2.0/db_1
  11. [root@huy1 ~]# chown -R oracle:oinstall /u01/app/oracle
  12. [root@huy1 ~]# chmod -R 775 /u01/app/oracle
3,网络配置 (每个节点)
/etc/hosts

点击(此处)折叠或打开

  1. 127.0.0.1 localhost.localdomain localhost
  2. 192.168.56.101 huy1
  3. 192.168.56.102 huy2
  4. 192.168.56.201 huy1-vip
  5. 192.168.56.202 huy2-vip
  6. 192.168.56.100 huy-scan
  7. 10.10.10.101 huy1-priv
  8. 10.10.10.102 huy2-priv
4, 内核参数配置   (每个节点)
vi /etc/sysctl.conf 

点击(此处)折叠或打开

  1. kernel.shmall = 268435456
  2. fs.aio-max-nr = 1048576
  3. fs.file-max = 6815744
  4. kernel.shmall = 2097152
  5. kernel.shmmax = 536870912
  6. kernel.shmmni = 4096
  7. kernel.sem = 250 32000 100 128
  8. net.ipv4.ip_local_port_range = 9000 65500
  9. net.core.rmem_default = 262144
  10. net.core.rmem_max = 4194304
  11. net.core.wmem_default = 262144
  12. net.core.wmem_max = 1048586
5, 用户限制 (每个节点)
[root@huy1 ~]# vi /etc/security/limits.conf  (追加)

点击(此处)折叠或打开

  1. oracle soft nproc 2047
  2. oracle hard nproc 16384
  3. oracle soft nofile 1024
  4. oracle hard nofile 65536
  5. oracle soft stack 10240
  6. grid soft nproc 2047
  7. grid hard nproc 16384
  8. grid soft nofile 1024
  9. grid hard nofile 65536
  10. grid soft stack 10240
[root@huy1 ~]# vi /etc/pam.d/login  追加

点击(此处)折叠或打开

  1. session required /lib/security/pam_limits.so
vi /etc/profile 追加

  1. if [ $USER = "oracle" ]||[ $USER = "grid" ]; then 
         if [ $SHELL = "/bin/ksh" ]; then 
                     ulimit -p 16384 
                     ulimit -n 65536 
             else 
                     ulimit -u 16384 -n 65536 
             fi 
    fi

6, 关闭 NTP 各个节点
[root@huy1 ~]# chkconfig ntpd off

7, grid用户 SSH 相互信任 在节点一操作, passphrase都设置为空

点击(此处)折叠或打开

  1. [grid@huy1 ~]$ ssh-keygen -t dsa
  2. [grid@huy1 ~]$ ssh-keygen -t rsa
  3. [grid@huy1 ~]$ ssh huy2 ssh-keygen -t dsa
  4. [grid@huy1 ~]$ ssh huy2 ssh-keygen -t rsa
  5. [grid@huy1 ~]$ cat .ssh/id_dsa.pub >> .ssh/authorized_keys
  6. [grid@huy1 ~]$ cat .ssh/id_rsa.pub >> .ssh/authorized_keys
  7. [grid@huy1 ~]$ ssh huy2 cat .ssh/id_dsa.pub >> .ssh/authorized_keys
  8. grid@huy2's password: 
  9. [grid@huy1 ~]$ ssh huy2 cat .ssh/id_rsa.pub >> .ssh/authorized_keys
  10. grid@huy2's password: 
  11. [grid@huy1 ~]$ scp .ssh/authorized_keys huy2:~/.ssh/
  12. grid@huy2's password: 
测试 (两边节点)


点击(此处)折叠或打开

  1. [grid@huy1 ~]$ ssh huy1 date
  2. [grid@huy1 ~]$ ssh huy2 date
  3. [grid@huy1 ~]$ ssh huy1-priv date
  4. [grid@huy1 ~]$ ssh huy2-priv date


7, grid用户 SSH 相互信任 在节点一操作,  passphrase都设置为空

点击(此处)折叠或打开

  1. [oracle@huy1 ~]$ ssh-keygen -t dsa
  2. [oracle@huy1 ~]$ ssh-keygen -t rsa
  3. [oracle@huy1 ~]$ ssh huy2 ssh-keygen -t dsa
  4. [oracle@huy1 ~]$ ssh huy2 ssh-keygen -t rsa
  5. [oracle@huy1 ~]$ cat .ssh/id_dsa.pub >> .ssh/authorized_keys
  6. [oracle@huy1 ~]$ cat .ssh/id_rsa.pub >> .ssh/authorized_keys
  7. [oracle@huy1 ~]$ ssh huy2 cat .ssh/id_dsa.pub >> .ssh/authorized_keys
  8. oracle@huy2\'s password:
  9. [oracle@huy1 ~]$ ssh huy2 cat .ssh/id_rsa.pub >> .ssh/authorized_keys
  10. oracle@huy2\'s password:
  11. [oracle@huy1 ~]$ scp .ssh/authorized_keys huy2:~/.ssh/
  12. oracle@huy2's password: 
测试 (两边节点)

点击(此处)折叠或打开

  1. [oracle@huy1 ~]$ ssh huy1 date
  2. [oracle@huy1 ~]$ ssh huy2 date
  3. [oracle@huy1 ~]$ ssh huy1-priv date
  4. [oracle@huy1 ~]$ ssh huy2-priv date
8,安装asmlib (两边节点)

点击(此处)折叠或打开

  1. [root@huy1 asm]# ls
  2. oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm oracleasmlib-2.0.4-1.el5.i386.rpm oracleasm-support-2.1.3-1.el5.i386.rpm
  3. [root@huy1 asm]# rpm -ivh *.rpm

9, 配置asm磁盘 (节点一上)

点击(此处)折叠或打开

  1. [root@huy1 soft]# service oracleasm configure
  2. Configuring the Oracle ASM library driver.

  3. This will configure the on-boot properties of the Oracle ASM library
  4. driver. The following questions will determine whether the driver is
  5. loaded on boot and what permissions it will have. The current values
  6. will be shown in brackets (\'[]\'). Hitting <ENTER> without typing an
  7. answer will keep that current value. Ctrl-C will abort.

  8. Default user to own the driver interface []: grid
  9. Default group to own the driver interface []: asmadmin
  10. Start Oracle ASM library driver on boot (y/n) [n]: y
  11. Scan for Oracle ASM disks on boot (y/n) [y]: y
  12. Writing Oracle ASM library driver configuration: done
  13. Initializing the Oracle ASMLib driver: [ OK ]
  14. Scanning the system for Oracle ASMLib disks: [ OK ]
  15. [root@huy1 soft]# service oracleasm createdisk OCR_VOTE1 /dev/sdb1
  16. Marking disk \"OCR_VOTE1\" as an ASM disk: [ OK ]
  17. [root@huy1 soft]# service oracleasm createdisk OCR_VOTE2 /dev/sdb2
  18. Marking disk \"OCR_VOTE2\" as an ASM disk: [ OK ]
  19. [root@huy1 soft]# service oracleasm createdisk OCR_VOTE3 /dev/sdb3
  20. Marking disk \"OCR_VOTE3\" as an ASM disk: [ OK ]
  21. [root@huy1 soft]# service oracleasm createdisk DATA1 /dev/sdb5
  22. Marking disk \"DATA1\" as an ASM disk: [ OK ]
  23. [root@huy1 soft]# service oracleasm createdisk DATA2 /dev/sdb6
  24. Marking disk \"DATA2\" as an ASM disk: [ OK ]
  25. [root@huy1 soft]# service oracleasm createdisk RCY1 /dev/sdb7
  26. Marking disk \"RCY1\" as an ASM disk: [ OK ]
  27. [root@huy1 soft]# service oracleasm createdisk RCY2 /dev/sdb8
  28. Marking disk \"RCY2\" as an ASM disk: [ OK ]
  29. [root@huy1 soft]# service oracleasm listdisks
  30. DATA1
  31. DATA2
  32. OCR_VOTE1
  33. OCR_VOTE2
  34. OCR_VOTE3
  35. RCY1
  36. RCY2
  37. [root@huy1 soft]# ll /dev/oracleasm/disks
  38. total 0
  39. brw-rw---- 1 grid asmadmin 8, 21 Sep 9 18:01 DATA1
  40. brw-rw---- 1 grid asmadmin 8, 22 Sep 9 18:01 DATA2
  41. brw-rw---- 1 grid asmadmin 8, 17 Sep 9 18:00 OCR_VOTE1
  42. brw-rw---- 1 grid asmadmin 8, 18 Sep 9 18:00 OCR_VOTE2
  43. brw-rw---- 1 grid asmadmin 8, 19 Sep 9 18:00 OCR_VOTE3
  44. brw-rw---- 1 grid asmadmin 8, 23 Sep 9 18:01 RCY1
  45. brw-rw---- 1 grid asmadmin 8, 24 Sep 9 18:01 RCY2

另一个节点

点击(此处)折叠或打开

  1. [root@node2 asm]# service oracleasm configure
  2. Configuring the Oracle ASM library driver.

  3. This will configure the on-boot properties of the Oracle ASM library
  4. driver. The following questions will determine whether the driver is
  5. loaded on boot and what permissions it will have. The current values
  6. will be shown in brackets (\'[]\'). Hitting <ENTER> without typing an
  7. answer will keep that current value. Ctrl-C will abort.

  8. Default user to own the driver interface []: grid
  9. Default group to own the driver interface []: asmadmin
  10. Start Oracle ASM library driver on boot (y/n) [n]: y
  11. Scan for Oracle ASM disks on boot (y/n) [y]: y
  12. Writing Oracle ASM library driver configuration: done
  13. Initializing the Oracle ASMLib driver: [ OK ]
  14. Scanning the system for Oracle ASMLib disks: [ OK ]
  15. [root@node2 asm]# service oracleasm listdisks
  16. DATA1
  17. DATA2
  18. OCR_VOTE1
  19. OCR_VOTE2
  20. OCR_VOTE3
  21. RCY1
  22. RCY2
  23. [root@node2 asm]# ll /dev/oracleasm/disks
  24. total 0
  25. brw-rw---- 1 grid asmadmin 8, 21 Sep 9 18:01 DATA1
  26. brw-rw---- 1 grid asmadmin 8, 22 Sep 9 18:01 DATA2
  27. brw-rw---- 1 grid asmadmin 8, 17 Sep 9 18:01 OCR_VOTE1
  28. brw-rw---- 1 grid asmadmin 8, 18 Sep 9 18:01 OCR_VOTE2
  29. brw-rw---- 1 grid asmadmin 8, 19 Sep 9 18:01 OCR_VOTE3
  30. brw-rw---- 1 grid asmadmin 8, 23 Sep 9 18:01 RCY1
  31. brw-rw---- 1 grid asmadmin 8, 24 Sep 9 18:01 RCY2
10, 用 yum 安装  各个节点
[root@huy1 yum.repos.d]# yum install -y sysstat*
[root@huy1 yum.repos.d]# yum install -y libaio*
[root@huy1 yum.repos.d]# yum install -y unixODBC*

准备工作完成






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

转载于:http://blog.itpub.net/12238525/viewspace-1288988/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值