在Aix6.1上安装11g r2 rac grid infrastructure集群

954 views
824 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
954
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

在Aix6.1上安装11g r2 rac grid infrastructure集群

  1. 1. 在 AIX6.1 上安装 11gR2 RAC GridInfrastructure 集群 by Maclean.liu liu.maclean@gmail.com www.askmaclean.com
  2. 2. About Mel Email:liu.maclean@gmail.coml Blog:www.askmaclean.coml Oracle Employeel Oracle Certified Database Administrator Master 10gand 11gl Over 7 years experience with Oracle DBA technologyl Over 8 years experience with Linux technologyl Member Independent Oracle Users Groupl Member All China Users Groupl Presents for advanced Oracle topics: RAC,DataGuard, Performance Tuning and Oracle Internal.
  3. 3. 以下在 AIX 6.1+Veritas CFS 环境上安装 11gR2 RAC :1. 11gR2 GI/RAC 安装预备工作1.1 安装环境:硬件环境为 2 节点 IBM p 系列小型机,每个节点物理 CPU 数目 32 个,内存 509440 MB,交换空间32768MB 操作系统版本为 64bit AIX 6.1(6100-06-09-1228)。Setting ValueMachine and version AIX macleandb-007 1 6 00F71C964C00Fully qualified host name macleandb-007Platform 64-bit AIXO/S Version 6.1.0.0O/S Maintenance Level 6100-06O/S Service Pack Level 6100-06-09-1228Logged in as oracleLast run as uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1200(dba),1300(asmdba)Executed as Oracle home Yesowner?RDA home directory /oracle/rdaRDA work directory /oracle/rdaOutput file prefix RDAOutput file directory /oracle/rda/outputSetup profile DB11gPerform network pings? NoItem ValueProcessor(s) 32 Processor(s) Installed [01]: PowerPC_POWER7 3864 MHz [02]: PowerPC_POWER7 3864 MHz [03]: PowerPC_POWER7 3864 MHz [04]: PowerPC_POWER7 3864 MHz [05]: PowerPC_POWER7 3864 MHz [06]: PowerPC_POWER7 3864 MHz [07]: PowerPC_POWER7 3864 MHz [08]: PowerPC_POWER7 3864 MHz
  4. 4. [09]: PowerPC_POWER7 3864 MHz [10]: PowerPC_POWER7 3864 MHz [11]: PowerPC_POWER7 3864 MHz [12]: PowerPC_POWER7 3864 MHz [13]: PowerPC_POWER7 3864 MHz [14]: PowerPC_POWER7 3864 MHz [15]: PowerPC_POWER7 3864 MHz [16]: PowerPC_POWER7 3864 MHz [17]: PowerPC_POWER7 3864 MHz [18]: PowerPC_POWER7 3864 MHz [19]: PowerPC_POWER7 3864 MHz [20]: PowerPC_POWER7 3864 MHz [21]: PowerPC_POWER7 3864 MHz [22]: PowerPC_POWER7 3864 MHz [23]: PowerPC_POWER7 3864 MHz [24]: PowerPC_POWER7 3864 MHz [25]: PowerPC_POWER7 3864 MHz [26]: PowerPC_POWER7 3864 MHz [27]: PowerPC_POWER7 3864 MHz [28]: PowerPC_POWER7 3864 MHz [29]: PowerPC_POWER7 3864 MHz [30]: PowerPC_POWER7 3864 MHz [31]: PowerPC_POWER7 3864 MHz [32]: PowerPC_POWER7 3864 MHzTotal Physical Memory 509440 MBSwap: Max Size 32768 MiBSwap: Percent Used 1%1.1 网络环境:对于每台机器,需要配置:1 个机器固有 IP 地址(Public IP)和对应的机器名,在 DNS 中注册,或者写到/etc/hosts 文件中。1 个虚拟 IP 地址(Virtual IP)和对应的服务名,在 DNS 中注册,或者写到/etc/hosts 文件中。(与 Public IP 不同,但必须处于同一网段)1 个互联 IP 地址(Private IP)和对应的私有名,写到/etc/hosts 文件中。(这类 IP地址建议采用如: 172.168.*.* 或 192.168.*.*网段的地址)3 个 SCAN IP 地址,在 DNS 中注册,不适用 DNS 的情况下配置 1 个 SCAN IP 到/etc/hosts 中Node Interface Name Type Ip Address Registered inmacleandb-007 macleandb-007 Public 192.168.18.227 /etc/hostsmacleandb-008 macleandb-008 Public 192.168.18.231 /etc/hostsmacleandb-007 macleandb-007-vip VIP 192.168.18.226 /etc/hostsmacleandb-008 macleandb-008-vip VIP 192.168.18.230 /etc/hostsmacleandb-008 macleandb-scan1 SCAN IP 192.168.18.224 /etc/hosts
  5. 5. macleandb-007 macleandb-007-priva Private 172.168.1.101 /etc/hostsmacleandb-008 macleandb-008-priva Private 172.168.1.102 /etc/hostsmacleandb-007 macleandb-007-privb Private 172.168.2.101 /etc/hostsmacleandb-008 macleandb-008-privb Private 172.168.2.102 /etc/hosts使用 FTP 测试网络传输速率,2 节点传输文件平均速度为 50M/s:macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip macleandb-008-priva:/oracleTheauthenticity of host ‘macleandb-008-priva (172.168.1.102)’ can’t be established.RSA keyfingerprint is b1:2e:4f:40:7f:46:39:2d:ae:21:86:6f:75:bb:92:32.Are you sure you want to continueconnecting (yes/no)? yesWarning: Permanently added ‘macleandb-008-priva,172.168.1.102′ (RSA)to the list of known hosts.p10404530_112030_AIX64-5L_1of7.zip 20% 343MB47.3MB/s 00:28 ETAKilled by signal 2.macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip macleandb-008-privb:/oracleThe authenticity of host ‘macleandb-008-privb (172.168.2.102)’ can’t be established.RSA key fingerprint is b1:2e:4f:40:7f:46:39:2d:ae:21:86:6f:75:bb:92:32.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added ‘macleandb-008-privb,172.168.2.102′ (RSA) to the list of known hosts.p10404530_112030_AIX64-5L_1of7.zip11% 202MB 51.2MB/s 00:28 ETAKilled by signal 2.macleandb-007 #macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip macleandb-008:/oraclep10404530_112030_AIX64-5L_1of7.zip17% 299MB 50.6MB/s 00:27 ETAKilled by signal 2.1.1 缺省网关:在每台机器上都要对于公网接口定义缺省网关。定义网关是为了跨网段的客户端和应用服务器可以访问数据库服务器;如果操作系统已经配置了静态或动态路由,此处无需再配置网关。1.2 时钟同步:11.2 中使用 GI 自带的 CTSSD 节点间时间同步服务,不开启 NTPD 时间同步守护进程。
  6. 6. NTP is not required for 11gR2 since we have the Cluster Time Synchronization Service (CTSD),but if youare using NTP you need to use it with â..-xâ.. option:Checking: ps -ef |grep ntpsIf it hasno -x option do below steps: • · a. Open the /etc/rc.tcpip file, and locate the following line: start /usr/sbin/xntpd “$src_running” • · b. Change the line to the following: start /usr/sbin/xntpd “$src_running” “-x” • · c. Save the file.1.3 用户和组:创建必要的 grid 和 oracle 用户,以及 oinstall、dba 等组,保持在 2 个节点间的 UID、GID 一致macleandb-007 # mkgroup -’A’ id=’1000′ adms=’root’ oinstallmacleandb-007 # mkgroup -’A’id=’1100′ adms=’root’ asmadminmacleandb-007 # mkgroup -’A’ id=’1200′ adms=’root’dbamacleandb-007 # mkgroup -’A’ id=’1300′ adms=’root’ asmdbamacleandb-007 # mkgroup -’A’id=’1301′ adms=’root’ asmopermacleandb-007 # mkuser id=’1100′ pgrp=’oinstall’groups=’asmadmin,asmdba,asmoper’ home=’/home/grid’ gridmacleandb-007 # mkuser id=’1101′pgrp=’oinstall’ groups=’dba,asmdba’ home=’/home/oracle’ oraclemacleandb-007 # mkdir -p /oracle/app/product/11.2.0/db_1macleandb-007 # mkdir -p /oracle/app/product/gridmacleandb-007 # chown oracle:oinstall /oracle/app/product/11.2.0/db_1macleandb-007 # chown grid:oinstall /oracle/app/product/gridmacleandb-007 # chmod 755 /oracle/app/product/11.2.0/db_1macleandb-007 # chmod 755 /oracle/app/product/gridmacleandb-008 # mkgroup -’A’ id=’1000′ adms=’root’ oinstallmacleandb-008 # mkgroup -’A’ id=’1100′ adms=’root’ asmadminmacleandb-008 # mkgroup -’A’ id=’1200′ adms=’root’ dbamacleandb-008 # mkgroup -’A’ id=’1300′ adms=’root’ asmdbamacleandb-008 # mkgroup -’A’ id=’1301′ adms=’root’ asmopermacleandb-008 # mkuser id=’1100′ pgrp=’oinstall’ groups=’asmadmin,asmdba,asmoper’home=’/home/grid’ gridmacleandb-008 # mkuser id=’1101′ pgrp=’oinstall’ groups=’dba,asmdba’ home=’/home/oracle’ oraclemacleandb-008 # mkdir -p /oracle/app/product/11.2.0/db_1macleandb-008 # mkdir -p /oracle/app/product/grid
  7. 7. macleandb-008 # chown oracle:oinstall /oracle/app/product/11.2.0/db_1macleandb-008 # chown grid:oinstall /oracle/app/product/gridmacleandb-008 # chmod 755 /oracle/app/product/11.2.0/db_1macleandb-008 # chmod 755 /oracle/app/product/gridmacleandb-007 # id oracleuid=1101(oracle) gid=1000(oinstall) groups=1200(dba),1300(asmdba)macleandb-007 # id griduid=1100(grid) gid=1000(oinstall) groups=1100(asmadmin),1300(asmdba),1301(asmoper)macleandb-008 # id oracleuid=1101(oracle) gid=1000(oinstall) groups=1200(dba),1300(asmdba)macleandb-008 # id griduid=1100(grid) gid=1000(oinstall) groups=1100(asmadmin),1300(asmdba),1301(asmoper)赋予 grid 用户 CAP_NUMA_ATTACH 等权限:macleandb-008 # lsuser -a capabilities gridgridmacleandb-008 # chusercapabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATEgridmacleandb-008 # lsuser -a capabilities gridgridcapabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE1.1 用户 profile:
  8. 8. 在 profile 文件中为 Oracle 和 Grid 用户配置必要的环境变量参数:Grid profileumask 022export AIXTHREAD_SCOPE=SexportORACLE_HOME=/oracle/app/product/gridexport ORACLE_BASE=/oracle/appexport PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATHexport CRS_HOME=$ORACLE_HOMEexport LIBPATH=$ORACLE_HOME/liboracle profileumask 022export AIXTHREAD_SCOPE=Sexport ORACLE_HOME=/oracle/app/product/11.2.0/db_1export ORACLE_BASE=/oracle/appexport PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATHexport LIBPATH=$ORACLE_HOME/libexport ORA_NLS10=$ORACLE_HOME/nls/dataexport NLS_LANG=”Simplified Chinese”_China.AL32UTF81.1 配置 oracle 和 grid 用户的 shell limit 参数:可以通过 smitty chuser 或者 修改/etc/security/limits 配置文件配置用户的 shell limit 参数:macleandb-007 # cat /etc/security/limitsoracle:fsize = -1data = -1stack = -1core = -1rss = -1nofiles = -1grid:fsize = -1data = -1stack = -1
  9. 9. core = -1rss = -1nofiles = -1$ ulimit -atime(seconds) unlimitedfile(blocks) unlimiteddata(kbytes) unlimitedstack(kbytes) 4194304memory(kbytes) unlimitedcoredump(blocks) unlimitednofiles(descriptors) unlimitedthreads(per process) unlimitedprocesses(per user) unlimitedmacleandb-008 # cat /etc/security/limitsoracle:fsize = -1data = -1stack = -1core = -1rss = -1nofiles = -1grid:fsize = -1data = -1stack = -1core = -1rss = -1nofiles = -1$ ulimit -atime(seconds) unlimitedfile(blocks) unlimiteddata(kbytes) unlimitedstack(kbytes) 4194304memory(kbytes) unlimitedcoredump(blocks) unlimitednofiles(descriptors) unlimited
  10. 10. threads(per process) unlimitedprocesses(per user) unlimited1.2 配置 oracle 和 grid 用户的等价性在 macleandb-007、macleandb-008 2 节点之间配置 oracle 和 grid 用户的等价性。$ rm -rf $HOME/.ssh$ ./sshUserSetup.sh -user grid -hosts “macleandb-007 macleandb-008″-advanced PromptPassphraseThe output of this script is also logged into /tmp/sshUserSetup_2012-12-05-01-27-09.logHosts are macleandb-007 macleandb-008user is gridPlatform:- AIXChecking if the remote hosts are reachablePING macleandb-007: (192.168.18.227): 56 data bytes64 bytes from 192.168.18.227: icmp_seq=0 ttl=255 time=0 ms64 bytes from 192.168.18.227: icmp_seq=1 ttl=255 time=0 ms64 bytes from 192.168.18.227: icmp_seq=2 ttl=255 time=0 ms64 bytes from 192.168.18.227: icmp_seq=3 ttl=255 time=0 ms64 bytes from 192.168.18.227: icmp_seq=4 ttl=255 time=0 ms—-macleandb-007 PING Statistics—-5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 0/0/0 msPING macleandb-008: (192.168.18.231): 56 data bytes64 bytes from 192.168.18.231: icmp_seq=0 ttl=255 time=0 ms64 bytes from 192.168.18.231: icmp_seq=1 ttl=255 time=0 ms64 bytes from 192.168.18.231: icmp_seq=2 ttl=255 time=0 ms64 bytes from 192.168.18.231: icmp_seq=3 ttl=255 time=0 ms64 bytes from 192.168.18.231: icmp_seq=4 ttl=255 time=0 ms—-macleandb-008 PING Statistics—-5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 0/0/0 msRemote host reachability check succeeded.The following hosts are reachable: macleandb-007 macleandb-008.The following hosts are not reachable: .
  11. 11. All hosts are reachable. Proceeding further…firsthost macleandb-007numhosts 2The script will setup SSH connectivity from the host macleandb-007 to allthe remote hosts. After the script is executed, the user can use SSH to runcommands on the remote hosts or copy files between this host macleandb-007and the remote hosts without being prompted for passwords or confirmations.NOTE 1:As part of the setup procedure, this script will use ssh and scp to copyfiles between the local host and the remote hosts. Since the script does notstore passwords, you may be prompted for the passwords during the execution ofthe script whenever ssh or scp is invoked.NOTE 2:AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORYAND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TOTHESEdirectories.Do you want to continue and let the script make the above mentioned changes (yes/no)?yesThe user chose yesPlease specify if you want to specify a passphrase for the private key this script will create for the localhost. Passphrase is used to encrypt the private key and makes SSH much more secure. Type ‘yes’ or‘no’ and then press enter. In case you press ‘yes’, you would need to enter the passphrase wheneverthe script executes ssh or scp.The estimated number of times the user would be prompted for a passphrase is 4. In addition, if theprivate-public files are also newly created, the user would have to specify the passphrase on oneadditional occasion.Enter ‘yes’ or ‘no’.yesThe user chose yesCreating .ssh directory on local host, if not present alreadyCreating authorized_keys file on local hostChanging permissions on authorized_keys to 644 on local hostCreating known_hosts file on local hostChanging permissions on known_hosts to 644 on local hostCreating config file on local hostIf a config file exists already at /home/grid/.ssh/config, it would be backed up to
  12. 12. /home/grid/.ssh/config.backup.Removing old private/public keys on local hostRunning SSH keygen on local hostEnter passphrase (empty for no passphrase):Enter same passphrase again:Generating public/private rsa key pair.Your identification has been saved in /home/grid/.ssh/id_rsa.Your public key has been saved in /home/grid/.ssh/id_rsa.pub.The key fingerprint is:a6:87:38:26:11:7a:1e:d6:4a:eb:2b:6d:54:68:bc:29 grid@macleandb-007The key’s randomart image is:+–[ RSA 1024]—-+| || ||… || .+o. ||..*+. S ||E=+= . + || += + o . ||..oo . . || oo. |+—————–+Creating .ssh directory and setting permissions on remote host macleandb-007THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THEHOME DIRECTORY FOR grid. THIS IS AN SSH REQUIREMENT.The script would create /home/grid/.ssh/config file on remote host macleandb-007. If a config file existsalready at /home/grid/.ssh/config, it would be backed up to /home/grid/.ssh/config.backup.The user may be prompted for a password here since the script would be running SSH on hostmacleandb-007.Warning: Permanently added ‘macleandb-007,192.168.18.227′ (RSA) to the list of known hosts.grid@macleandb-007′s password:Done with creating .ssh directory and setting permissions on remote host macleandb-007.Creating .ssh directory and setting permissions on remote host macleandb-008THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THEHOME DIRECTORY FOR grid. THIS IS AN SSH REQUIREMENT.The script would create /home/grid/.ssh/config file on remote host macleandb-008. If a config file existsalready at /home/grid/.ssh/config, it would be backed up to /home/grid/.ssh/config.backup.The user may be prompted for a password here since the script would be running SSH on hostmacleandb-008.Warning: Permanently added ‘macleandb-008,192.168.18.231′ (RSA) to the list of known hosts.grid@macleandb-008′s password:Done with creating .ssh directory and setting permissions on remote host macleandb-008.Copying local host public key to the remote host macleandb-007
  13. 13. The user may be prompted for a password or passphrase here since the script would be using SCP forhost macleandb-007.grid@macleandb-007′s password:Done copying local host public key to the remote host macleandb-007Copying local host public key to the remote host macleandb-008The user may be prompted for a password or passphrase here since the script would be using SCP forhost macleandb-008.grid@macleandb-008′s password:Done copying local host public key to the remote host macleandb-008Creating keys on remote host macleandb-007 if they do not exist already. This is required to setup SSHon host macleandb-007.Creating keys on remote host macleandb-008 if they do not exist already. This is required to setup SSHon host macleandb-008.Generating public/private rsa key pair.Your identification has been saved in .ssh/id_rsa.Your public key has been saved in .ssh/id_rsa.pub.The key fingerprint is:57:10:a3:c8:c6:ec:55:3f:1c:ea:c3:c5:ef:bf:23:b6 grid@macleandb-008The key’s randomart image is:+–[ RSA 1024]—-+| =.. || +.oB. || *o.B || o.ooo || .S= . || ... || . || oo|| .Eo.+|+—————–+Updating authorized_keys file on remote host macleandb-007Updating known_hosts file on remote host macleandb-007The script will run SSH on the remote machine macleandb-007. The user may be prompted for apassphrase here in case the private key has been encrypted with a passphrase.Updating authorized_keys file on remote host macleandb-008Updating known_hosts file on remote host macleandb-008The script will run SSH on the remote machine macleandb-008. The user may be prompted for apassphrase here in case the private key has been encrypted with a passphrase.cat: 0652-050 Cannot open /home/grid/.ssh/known_hosts.tmp.cat: 0652-050 Cannot open /home/grid/.ssh/authorized_keys.tmp.SSH setup is complete.
  14. 14. ————————————————————————Verifying SSH setup===================The script will now run the date command on the remote nodes using sshto verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FORPASSWORDS. If you see any output other than date or are prompted for thepassword, ssh is not setup correctly and you will need to resolve theissue and set up ssh again.The possible causes for failure could be:1. The server settings in /etc/ssh/sshd_config file do not allow sshfor user grid.2. The server may have disabled public key based authentication.3. The client public key on the server may be outdated.4. /home/grid or /home/grid/.ssh on the remote host may not be owned by grid.5. User may not have passed -shared option for shared remote users ormay be passing the -shared option for non-shared remote users.6. If there is output in addition to the date, but no password is asked,it may be a security alert shown as part of company policy. Append theadditional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.————————————————————————–macleandb-007:–Running /usr/bin/ssh -x -l grid macleandb-007 date to verify SSH connectivity has been setup fromlocal host to macleandb-007.IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOUARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEENSUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted fora password is ERROR.The script will run SSH on the remote machine macleandb-007. The user may be prompted for apassphrase here in case the private key has been encrypted with a passphrase.Wed Dec 5 01:28:15 GMT+08:00 2012————————————————————————–macleandb-008:–Running /usr/bin/ssh -x -l grid macleandb-008 date to verify SSH connectivity has been setup fromlocal host to macleandb-008.IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOUARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEENSUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted fora password is ERROR.The script will run SSH on the remote machine macleandb-008. The user may be prompted for apassphrase here in case the private key has been encrypted with a passphrase.Wed Dec 5 01:28:20 GMT+08:00 2012
  15. 15. ————————————————————————————————————————————————Verifying SSH connectivity has been setup from macleandb-007 to macleandb-007IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOUARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEENSUCCESSFUL.Wed Dec 5 01:28:16 GMT+08:00 2012————————————————————————————————————————————————Verifying SSH connectivity has been setup from macleandb-007 to macleandb-008IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOUARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEENSUCCESSFUL.Wed Dec 5 01:28:21 GMT+08:00 2012————————————————————————-Verification from complete-SSH verification complete.$ ./sshUserSetup.sh -user oracle -hosts “macleandb-007 macleandb-008″ -advancedPromptPassphraseThe output of this script is also logged into /tmp/sshUserSetup_2012-12-05-01-31-18.logHosts are macleandb-007 macleandb-008user is oraclePlatform:- AIXChecking if the remote hosts are reachablePING macleandb-007: (192.168.18.227): 56 data bytes64 bytes from 192.168.18.227: icmp_seq=0 ttl=255 time=0 ms64 bytes from 192.168.18.227: icmp_seq=1 ttl=255 time=0 ms64 bytes from 192.168.18.227: icmp_seq=2 ttl=255 time=0 ms64 bytes from 192.168.18.227: icmp_seq=3 ttl=255 time=0 ms64 bytes from 192.168.18.227: icmp_seq=4 ttl=255 time=0 ms—-macleandb-007 PING Statistics—-5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 0/0/0 ms
  16. 16. PING macleandb-008: (192.168.18.231): 56 data bytes64 bytes from 192.168.18.231: icmp_seq=0 ttl=255 time=0 ms64 bytes from 192.168.18.231: icmp_seq=1 ttl=255 time=0 ms64 bytes from 192.168.18.231: icmp_seq=2 ttl=255 time=0 ms64 bytes from 192.168.18.231: icmp_seq=3 ttl=255 time=0 ms64 bytes from 192.168.18.231: icmp_seq=4 ttl=255 time=0 ms—-macleandb-008 PING Statistics—-5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 0/0/0 msRemote host reachability check succeeded.The following hosts are reachable: macleandb-007 macleandb-008.The following hosts are not reachable: .All hosts are reachable. Proceeding further…firsthost macleandb-007numhosts 2The script will setup SSH connectivity from the host macleandb-007 to allthe remote hosts. After the script is executed, the user can use SSH to runcommands on the remote hosts or copy files between this host macleandb-007and the remote hosts without being prompted for passwords or confirmations.NOTE 1:As part of the setup procedure, this script will use ssh and scp to copyfiles between the local host and the remote hosts. Since the script does notstore passwords, you may be prompted for the passwords during the execution ofthe script whenever ssh or scp is invoked.NOTE 2:AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORYAND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TOTHESEdirectories.Do you want to continue and let the script make the above mentioned changes (yes/no)?yesThe user chose yesPlease specify if you want to specify a passphrase for the private key this script will create for the localhost. Passphrase is used to encrypt the private key and makes SSH much more secure. Type ‘yes’ or‘no’ and then press enter. In case you press ‘yes’, you would need to enter the passphrase wheneverthe script executes ssh or scp.The estimated number of times the user would be prompted for a passphrase is 4. In addition, if the
  17. 17. private-public files are also newly created, the user would have to specify the passphrase on oneadditional occasion.Enter ‘yes’ or ‘no’.yesThe user chose yesCreating .ssh directory on local host, if not present alreadyCreating authorized_keys file on local hostChanging permissions on authorized_keys to 644 on local hostCreating known_hosts file on local hostChanging permissions on known_hosts to 644 on local hostCreating config file on local hostIf a config file exists already at /home/oracle/.ssh/config, it would be backed up to/home/oracle/.ssh/config.backup.Removing old private/public keys on local hostRunning SSH keygen on local hostEnter passphrase (empty for no passphrase):Enter same passphrase again:Generating public/private rsa key pair.Your identification has been saved in /home/oracle/.ssh/id_rsa.Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.The key fingerprint is:de:e1:bd:ac:7d:f0:25:68:3c:80:33:24:53:ae:31:fb oracle@macleandb-007The key’s randomart image is:+–[ RSA 1024]—-+| .. || o.. || o+.. || =+ . || o So.o . || o o o* . .|| E o..+ o || o .o || ..+. |+—————–+Creating .ssh directory and setting permissions on remote host macleandb-007THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THEHOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.The script would create /home/oracle/.ssh/config file on remote host macleandb-007. If a config fileexists already at /home/oracle/.ssh/config, it would be backed up to /home/oracle/.ssh/config.backup.The user may be prompted for a password here since the script would be running SSH on hostmacleandb-007.Warning: Permanently added ‘macleandb-007,192.168.18.227′ (RSA) to the list of known hosts.
  18. 18. oracle@macleandb-007′s password:Done with creating .ssh directory and setting permissions on remote host macleandb-007.Creating .ssh directory and setting permissions on remote host macleandb-008THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THEHOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.The script would create /home/oracle/.ssh/config file on remote host macleandb-008. If a config fileexists already at /home/oracle/.ssh/config, it would be backed up to /home/oracle/.ssh/config.backup.The user may be prompted for a password here since the script would be running SSH on hostmacleandb-008.Warning: Permanently added ‘macleandb-008,192.168.18.231′ (RSA) to the list of known hosts.oracle@macleandb-008′s password:Done with creating .ssh directory and setting permissions on remote host macleandb-008.Copying local host public key to the remote host macleandb-007The user may be prompted for a password or passphrase here since the script would be using SCP forhost macleandb-007.oracle@macleandb-007′s password:Done copying local host public key to the remote host macleandb-007Copying local host public key to the remote host macleandb-008The user may be prompted for a password or passphrase here since the script would be using SCP forhost macleandb-008.oracle@macleandb-008′s password:Done copying local host public key to the remote host macleandb-008Creating keys on remote host macleandb-007 if they do not exist already. This is required to setup SSHon host macleandb-007.Creating keys on remote host macleandb-008 if they do not exist already. This is required to setup SSHon host macleandb-008.Generating public/private rsa key pair.Your identification has been saved in .ssh/id_rsa.Your public key has been saved in .ssh/id_rsa.pub.The key fingerprint is:b2:b1:d7:2d:2a:bf:d9:76:5c:2a:6e:97:d9:7d:7c:3e oracle@macleandb-008The key’s randomart image is:+–[ RSA 1024]—-+| || || || || oS || =.. . || o . o..* o || .. ++.B .E=|| o==o+ .=|
  19. 19. +—————–+Updating authorized_keys file on remote host macleandb-007Updating known_hosts file on remote host macleandb-007The script will run SSH on the remote machine macleandb-007. The user may be prompted for apassphrase here in case the private key has been encrypted with a passphrase.Updating authorized_keys file on remote host macleandb-008Updating known_hosts file on remote host macleandb-008The script will run SSH on the remote machine macleandb-008. The user may be prompted for apassphrase here in case the private key has been encrypted with a passphrase.cat: 0652-050 Cannot open /home/oracle/.ssh/known_hosts.tmp.cat: 0652-050 Cannot open /home/oracle/.ssh/authorized_keys.tmp.SSH setup is complete.————————————————————————Verifying SSH setup===================The script will now run the date command on the remote nodes using sshto verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FORPASSWORDS. If you see any output other than date or are prompted for thepassword, ssh is not setup correctly and you will need to resolve theissue and set up ssh again.The possible causes for failure could be:1. The server settings in /etc/ssh/sshd_config file do not allow sshfor user oracle.2. The server may have disabled public key based authentication.3. The client public key on the server may be outdated.4. /home/oracle or /home/oracle/.ssh on the remote host may not be owned by oracle.5. User may not have passed -shared option for shared remote users ormay be passing the -shared option for non-shared remote users.6. If there is output in addition to the date, but no password is asked,it may be a security alert shown as part of company policy. Append theadditional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.————————————————————————–macleandb-007:–Running /usr/bin/ssh -x -l oracle macleandb-007 date to verify SSH connectivity has been setup fromlocal host to macleandb-007.IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOUARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEENSUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted fora password is ERROR.The script will run SSH on the remote machine macleandb-007. The user may be prompted for a
  20. 20. passphrase here in case the private key has been encrypted with a passphrase.Wed Dec 5 01:31:50 GMT+08:00 2012————————————————————————–macleandb-008:–Running /usr/bin/ssh -x -l oracle macleandb-008 date to verify SSH connectivity has been setup fromlocal host to macleandb-008.IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOUARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEENSUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted fora password is ERROR.The script will run SSH on the remote machine macleandb-008. The user may be prompted for apassphrase here in case the private key has been encrypted with a passphrase.Wed Dec 5 01:31:55 GMT+08:00 2012————————————————————————————————————————————————Verifying SSH connectivity has been setup from macleandb-007 to macleandb-007IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOUARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEENSUCCESSFUL.Wed Dec 5 01:31:51 GMT+08:00 2012————————————————————————————————————————————————Verifying SSH connectivity has been setup from macleandb-007 to macleandb-008IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOUARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEENSUCCESSFUL.Wed Dec 5 01:31:57 GMT+08:00 2012————————————————————————-Verification from complete-SSH verification complete.1.3 OS 参数优化:Oracle 推荐在 RAC 环境中设置tcp_ephemeral_low、tcp_ephemeral_high、udp_ephemeral_low、udp_ephemeral_high 等网络参数,以便优化网络传输性能,加强心跳网络可用性:macleandb-007 # chdev -l sys0 -a maxuproc=16384sys0 changed
  21. 21. macleandb-007 # lsattr -E -l sys0 -a maxuprocmaxuproc 16384 Maximum number of PROCESSES allowed per user Truemacleandb-007 # lsattr -El sys0 | grep maxuproc | awk ‘{print $2}’16384macleandb-007 # lsattr -El sys0 | grep ncargs | awk ‘{print $2}’256macleandb-008 # chdev -l sys0 -a maxuproc=16384sys0 changedmacleandb-008 # lsattr -E -l sys0 -a maxuprocmaxuproc 16384 Maximum number of PROCESSES allowed per user Truemacleandb-008 # lsattr -El sys0 | grep maxuproc | awk ‘{print $2}’16384macleandb-008 # lsattr -El sys0 | grep ncargs | awk ‘{print $2}’256macleandb-007 # /usr/sbin/no -p -o tcp_ephemeral_low=9000 -o tcp_ephemeral_high=65500Setting tcp_ephemeral_low to 9000Setting tcp_ephemeral_low to 9000 in nextboot fileSetting tcp_ephemeral_high to 65500Setting tcp_ephemeral_high to 65500 in nextboot filemacleandb-007 # /usr/sbin/no -p -o udp_ephemeral_low=9000 -o udp_ephemeral_high=65500Setting udp_ephemeral_low to 9000Setting udp_ephemeral_low to 9000 in nextboot fileSetting udp_ephemeral_high to 65500Setting udp_ephemeral_high to 65500 in nextboot filemacleandb-008 # /usr/sbin/no -p -o tcp_ephemeral_low=9000 -o tcp_ephemeral_high=65500Setting tcp_ephemeral_low to 9000
  22. 22. Setting tcp_ephemeral_low to 9000 in nextboot fileSetting tcp_ephemeral_high to 65500Setting tcp_ephemeral_high to 65500 in nextboot filemacleandb-008 # /usr/sbin/no -p -o udp_ephemeral_low=9000 -o udp_ephemeral_high=65500Setting udp_ephemeral_low to 9000Setting udp_ephemeral_low to 9000 in nextboot fileSetting udp_ephemeral_high to 65500Setting udp_ephemeral_high to 65500 in nextboot fileno -po tcp_sendspace=65536no -po tcp_recvspace=65536no -po sb_max=41943040no -po udp_sendspace=2097152no -po udp_recvspace=20971520no -r -o ipqmaxlen=512macleandb-007 # no -po rfc1323=1Setting rfc1323 to 1Setting rfc1323 to 1 in nextboot fileChange to tunable rfc1323, will only be effective for future connectionsmacleandb-008 # no -a |grep “rfc1323″rfc1323 = 1macleandb-008 # ioo -o aio_maxreqsaio_maxreqs = 655361.4 存储环境:由于使用 Veritas Cluster Filesystem,故无需配置 ASM。为 GI 的 ocr 和 votedisk 创建专用的共享文件系统上的文件目录:
  23. 23. macleandb-007 # chown grid:oinstall /oraclemacleandb-008 # chown grid:oinstall/oraclemacleandb-007 # chown oracle:oinstall /oradata/*macleandb-007 # cd /oradatamacleandb-007 # su – grid$ cd oradata01$ mkdir ocr$ cd ..$ mkdir oradata02/ocr$ mkdir oradata03/ocr$ mkdir oradata01/vote$ mkdir oradata02/vote$ mkdir oradata03/vote1.5 使用 cluvfy、rda 工具验证安装环境:Cluster Verification Utilit(CVU)是 Oracle 所推荐的一种集群检验工具。该检验工具帮助用户在 Cluter 部署的各个阶段验证集群的重要组件,这些阶段包括硬件搭建、Clusterware 的安装、RDBMS 的安装、存储等等。我们既可以在 Cluster 安装之前使用 CVU 来帮我们检验所配置的环境正确可用,也可以在软件安装完成后使用 CVU 来做对集群的验收。CVU 提供了一种可扩展的框架,其所实施的常规检验活动是独立于具体的平台,并且向存储和网络的检验提供了厂商接口(Vendor Interface)。CVU 工具不依赖于其他 Oracle 软件,仅使用命令 cluvfy,如 cluvfy stage -pre crsinst -n vrh1,vrh2。cluvfy 的部署十分简单,在本地节点安装后,该工具在运行过程中会自动部署到远程主机上。具体的自动部署流程如下: 1.用户在本地节点安装 CVU 2.用户针对多个节点实施 Verify 检验命令 3.CVU 工具将拷贝自身必要的文件到远程节点
  24. 24. 4.CVU 会在所有节点执行检验任务并生成报告CVU 工具可以为我们提供以下功能: 1.验证 Cluster 集群是否规范配置以便后续的 RAC 安装、配置和操作顺利 2.全类型的验证 3.非破坏性的验证 4.提供了易于使用的接口 5.支持各种平台和配置的 RAC,明确完善的统一行为方式注意不要误解 cluvfy 的作用,它仅仅是一个检验者,而不负责实际的配置或修复工作:cluvfy 不支持任何类型的 cluster 或 RAC 操作在检验到问题或失败后,cluvfy 不会采取任何修正行为cluvfy 不是性能调优或监控工具cluvfy 不会尝试帮助你验证 RAC 数据库的内部结构RAC 的实际部署可以被逻辑地区分为多个操作阶段,这些阶段被称作是”stage”,在实际的部署过程中每一个 stage 由一系列的操作组成。每一个 stage 的都有自身的预检查(pre-check)和验收检查(post-check),如图:$ cluvfy stage -post hwos -n macleandb-007,macleandb-008Performing post-checks for hardwareand operating system setupChecking node reachability…
  25. 25. Node reachability check passed from node “macleandb-007″Checking user equivalence…User equivalence check passed for user “oracle”Checking node connectivity…Checking hosts config file…Verification of the hosts config file successfulNode connectivity passed for subnet “172.168.1.0″ with node(s) macleandb-008,macleandb-007TCP connectivity check passed for subnet “172.168.1.0″Node connectivity passed for subnet “172.168.2.0″ with node(s) macleandb-008,macleandb-007TCP connectivity check passed for subnet “172.168.2.0″Node connectivity passed for subnet “192.168.18.128″ with node(s) macleandb-008,macleandb-007TCP connectivity check passed for subnet “192.168.18.128″Interfaces found on subnet “172.168.1.0″ that are likely candidates for VIP are:macleandb-008 en0:172.168.1.102 en0:172.168.1.102macleandb-007 en0:172.168.1.101 en0:172.168.1.101Interfaces found on subnet “172.168.2.0″ that are likely candidates for VIP are:macleandb-008 en1:172.168.2.102 en1:172.168.2.102macleandb-007 en1:172.168.2.101 en1:172.168.2.101Interfaces found on subnet “192.168.18.128″ that are likely candidates for VIP are:macleandb-008 en5:192.168.18.231 en5:192.168.18.231macleandb-007 en5:192.168.18.227 en5:192.168.18.227 en5:192.168.18.227WARNING:Could not find a suitable set of interfaces for the private interconnectChecking subnet mask consistency…Subnet mask consistency check passed for subnet “172.168.1.0″.Subnet mask consistency check passed for subnet “172.168.2.0″.Subnet mask consistency check passed for subnet “192.168.18.128″.
  26. 26. Subnet mask consistency check passed.Node connectivity check passedChecking multicast communication…Checking subnet “172.168.1.0″ for multicast communication with multicast group “230.0.1.0″…Check of subnet “172.168.1.0″ for multicast communication with multicast group “230.0.1.0″ passed.Checking subnet “172.168.2.0″ for multicast communication with multicast group “230.0.1.0″…Check of subnet “172.168.2.0″ for multicast communication with multicast group “230.0.1.0″ passed.Checking subnet “192.168.18.128″ for multicast communication with multicast group “230.0.1.0″…Check of subnet “192.168.18.128″ for multicast communication with multicast group “230.0.1.0″passed.Check of multicast communication passed.Check for multiple users with UID value 0 passedTime zone consistency check passedChecking shared storage accessibility…Disk Sharing Nodes (2 in count)———————————— ————————/dev/rhdisk2 macleandb-008 macleandb-007/dev/rhdisk3 macleandb-008 macleandb-007/dev/rhdisk4 macleandb-008 macleandb-007/dev/rhdisk5 macleandb-008 macleandb-007/dev/rhdisk6 macleandb-008 macleandb-007$ cluvfy stage -pre crsinst -n macleandb-007,macleandb-008Performing pre-checks for cluster services setupChecking node reachability…Node reachability check passed from node “macleandb-007″
  27. 27. Checking user equivalence…User equivalence check passed for user “oracle”Checking node connectivity…Checking hosts config file…Verification of the hosts config file successfulNode connectivity passed for subnet “172.168.1.0″ with node(s) macleandb-008,macleandb-007TCP connectivity check passed for subnet “172.168.1.0″Node connectivity passed for subnet “172.168.2.0″ with node(s) macleandb-008,macleandb-007TCP connectivity check passed for subnet “172.168.2.0″Node connectivity passed for subnet “192.168.18.128″ with node(s) macleandb-008,macleandb-007TCP connectivity check passed for subnet “192.168.18.128″Interfaces found on subnet “172.168.1.0″ that are likely candidates for VIP are:macleandb-008 en0:172.168.1.102 en0:172.168.1.102macleandb-007 en0:172.168.1.101 en0:172.168.1.101Interfaces found on subnet “172.168.2.0″ that are likely candidates for VIP are:macleandb-008 en1:172.168.2.102 en1:172.168.2.102macleandb-007 en1:172.168.2.101 en1:172.168.2.101Interfaces found on subnet “192.168.18.128″ that are likely candidates for VIP are:macleandb-008 en5:192.168.18.231 en5:192.168.18.231macleandb-007 en5:192.168.18.227 en5:192.168.18.227 en5:192.168.18.227WARNING:Could not find a suitable set of interfaces for the private interconnectChecking subnet mask consistency…Subnet mask consistency check passed for subnet “172.168.1.0″.Subnet mask consistency check passed for subnet “172.168.2.0″.Subnet mask consistency check passed for subnet “192.168.18.128″.Subnet mask consistency check passed.
  28. 28. Node connectivity check passedChecking multicast communication…Checking subnet “172.168.1.0″ for multicast communication with multicast group “230.0.1.0″…Check of subnet “172.168.1.0″ for multicast communication with multicast group “230.0.1.0″ passed.Checking subnet “172.168.2.0″ for multicast communication with multicast group “230.0.1.0″…Check of subnet “172.168.2.0″ for multicast communication with multicast group “230.0.1.0″ passed.Checking subnet “192.168.18.128″ for multicast communication with multicast group “230.0.1.0″…Check of subnet “192.168.18.128″ for multicast communication with multicast group “230.0.1.0″passed.Check of multicast communication passed.Total memory check passedAvailable memory check passedSwap space check passedFree disk space check passed for “macleandb-008:/oracle/app/product/grid”Free disk space check passed for “macleandb-007:/oracle/app/product/grid”Free disk space check failed for “macleandb-008:/tmp/”Check failed on nodes:macleandb-008Free disk space check passed for “macleandb-007:/tmp/”Check for multiple users with UID value 1101 passedUser existence check passed for “oracle”Group existence check passed for “oinstall”Group existence check passed for “dba”Membership check for user “oracle” in group “oinstall” [as Primary] passedMembership check for user “oracle” in group “dba” passedRun level check passedHard limits check passed for “maximum open file descriptors”Soft limits check passed for “maximum open file descriptors”Hard limits check passed for “maximum user processes”Soft limits check passed for “maximum user processes”System architecture check passedKernel version check passedKernel parameter check passed for “ncargs”Kernel parameter check passed for “maxuproc”Kernel parameter check passed for “tcp_ephemeral_low”Kernel parameter check passed for “tcp_ephemeral_high”Kernel parameter check passed for “udp_ephemeral_low”
  29. 29. Kernel parameter check passed for “udp_ephemeral_high”Package existence check passed for “bos.adt.base”Package existence check passed for “bos.adt.lib”Package existence check passed for “bos.adt.libm”Package existence check passed for “bos.perf.libperfstat”Package existence check passed for “bos.perf.perfstat”Package existence check passed for “bos.perf.proctools”Package existence check passed for “xlC.aix61.rte”Package existence check passed for “xlC.rte”Operating system patch check failed for “Patch IZ97457″Check failed on nodes:macleandb-008,macleandb-007Operating system patch check failed for “Patch IZ89165″Check failed on nodes:macleandb-008,macleandb-007Check for multiple users with UID value 0 passedCurrent group ID check passedStarting check for consistency of primary group of root userCheck for consistency of root user’s primary group passedStarting Clock synchronization checks using Network Time Protocol(NTP)…NTP Configuration file check started…NTP Configuration file check passedNo NTP Daemons or Services were found to be runningPRVF-5507 : NTP daemon or service is not running on any node but NTP configuration file exists onthe following node(s):macleandb-008,macleandb-007Clock synchronization check using Network Time Protocol(NTP) failedCore file name pattern consistency check passed.User “oracle” is not part of “system” group. Check passedDefault user file creation mask check passedChecking consistency of file “/etc/resolv.conf” across nodesFile “/etc/resolv.conf” does not exist on any node of the cluster. Skipping further checksFile “/etc/resolv.conf” is consistent across nodes
  30. 30. Time zone consistency check passedUser ID < 65535 check passedKernel 64-bit mode check passedPre-check for cluster services setup was unsuccessful on all the nodes.Test “Oracle Database 11g R2 (11.2.0) Preinstall (AIX)” executed at 05-Dec-2012 01:40:28Test Results~~~~~~~~~~~~ID NAME RESULT VALUE====== ==================== ======= ==========================================A00010 OS Certified? PASSED CertifiedA00015 HARDWARE_BITMODE 64? PASSED is 64-bitA00016 System mode 64-bit? FAILED bootinfo errorA00020 User in /etc/passwd? PASSED userOKA00040 Group in /etc/group? PASSED GroupOKA00050 Enter ORACLE_HOME RECORDA00060 ORACLE_HOME Valid? FAILED OHnotvalidA00070 O_H Permissions OK? FAILED ORACLE_HOME must exist for this ruleA00080 oraInventory Permiss PASSED oraInventoryNotFoundA00090 Got Software Tools? PASSED ld_nm_ar_make_foundA00100 Umask Set to 022? PASSED UmaskOKA00110 ulimits OK? FAILED StackTooSmallA00140 LDLIBRARYPATH Unset? PASSED UnSetA00160 LIBPATH Unset? PASSED UnSetA00190 Enter JDK Home RECORDA00200 JDK Version FAILED JDK home is missingA00210 Other O_Hs in PATH? PASSED NoneFoundA00220 Other OUI Up? PASSED NoOtherOUIA00230 /tmp Adequate? PASSED TempSpaceOK
  31. 31. A00240 Disk Space OK? SKIPPED This rule needs an accessible ORACLE_..>A00250 Swap (in MB) RECORD 512A00260 RAM (in MB) PASSED 509440A00270 SwapToRAM OK? FAILED SwapLessThanRAMA00290 IP Address RECORD 192.168.18.227A00300 Domain Name RECORD NotFoundA00310 DNS Lookup FAILED Host not correctly registered in DNSA00320 /etc/hosts Format FAILED no entry foundA00330 Kernel Parameters OK FAILED NoAccessA00335 aio_maxreqs OK? FAILED ioo errorA00340 AIXTHREAD_SCOPE=S? PASSED AIXTHREAD_SCOPEOKA00350 LINK_CNTRL is Unset? PASSED LINK_CNTRLunsetA00410 Got OS Patches? PASSED PatchesNotRequiredA00430 Got OS Packages? FAILED [gpfs.base] not installedA00445 TCP/UDP Ephemeral OK PASSED Ephemeral OK以上检测出现 fail 的环节可以忽略,安装环境已成熟。11gR2 GI/RAC 正式安装1. 解压安装介质并运行 rootpre.sh 脚本:拷贝一个 UNZIP 过来 macleandb-007 # /tmp/unzip p10404530_112030_AIX64-5L_1of7.zipmacleandb-007 # /tmp/unzip p10404530_112030_AIX64-5L_2of7.zipmacleandb-007 # /tmp/unzip p10404530_112030_AIX64-5L_3of7.zipmacleandb-007 # ./rootpre.sh./rootpre.sh output will be logged in /tmp/rootpre.out_12-12-05.01:14:00Checking if group services should be configured….Nothing to configure.
  32. 32. 2. 执行./runInstaller 启动 GI 安装step1 选择 skil software updates
  33. 33. step 2 选择 安装为 clusterstep3 选择 Advanced Installation
  34. 34. Step4 加入简体中文语言step5 填入合适的 cluster name 和 scan name,使用默认端口 1521
  35. 35. step 6 验证 SSH 等价性
  36. 36. step7 指定 en0、en1 为 private network, en5 为 public networkstep8 指定 shared file system 为存储类型
  37. 37. step9 指定 ocr 位置step10 指定 votedisk 位置,后续步骤点击 Next 即可
  38. 38. 在 2 个节点上执行必要的 orainstRoot.sh 和 root.sh 脚本:macleandb-007 # /home/grid/app/oraInventory/orainstRoot.shChanging permissions of/home/grid/app/oraInventory.Adding read,write permissions forgroup.Removing read,write,execute permissions for world.Changing groupname of /home/grid/app/oraInventory to oinstall.The execution of the script is complete.macleandb-007 # /oracle/app/product/grid/root.shPerforming root user operation for Oracle 11gThe following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /oracle/app/product/gridEnter the full pathname of the local bin directory: [/usr/local/bin]:Creating /usr/local/bin directory…Copying dbhome to /usr/local/bin …Copying oraenv to /usr/local/bin …Copying coraenv to /usr/local/bin …
  39. 39. Creating /etc/oratab file…Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Using configuration parameter file: /oracle/app/product/grid/crs/install/crsconfig_paramsCreating trace directoryUser ignored Prerequisites during installationUser grid has the required capabilities to run CSSD in realtime modeOLR initialization – successfulroot walletroot wallet certroot cert exportpeer walletprofile reader walletpa walletpeer wallet keyspa wallet keyspeer cert requestpa cert requestpeer certpa certpeer root cert TPprofile reader root cert TPpa root cert TPpeer pa cert TPpa peer cert TPprofile reader pa cert TPprofile reader peer cert TPpeer user certpa user certAdding Clusterware entries to inittabCRS-2672: Attempting to start ‘ora.mdnsd’ on ‘macleandb-007′CRS-2676: Start of ‘ora.mdnsd’ on ‘macleandb-007′ succeededCRS-2672: Attempting to start ‘ora.gpnpd’ on ‘macleandb-007′CRS-2676: Start of ‘ora.gpnpd’ on ‘macleandb-007′ succeededCRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘macleandb-007′CRS-2672: Attempting to start ‘ora.gipcd’ on ‘macleandb-007′
  40. 40. CRS-2676: Start of ‘ora.cssdmonitor’ on ‘macleandb-007′ succeededCRS-2676: Start of ‘ora.gipcd’ on ‘macleandb-007′ succeededCRS-2672: Attempting to start ‘ora.cssd’ on ‘macleandb-007′CRS-2672: Attempting to start ‘ora.diskmon’ on ‘macleandb-007′CRS-2676: Start of ‘ora.diskmon’ on ‘macleandb-007′ succeededCRS-2676: Start of ‘ora.cssd’ on ‘macleandb-007′ succeededclscfg: -install mode specifiedSuccessfully accumulated necessary OCR keys.Creating OCR keys for user ‘root’, privgrp ’system’..Operation successful.Now formatting voting disk: /oradata/oradata01/vote/vote1.Now formatting voting disk: /oradata/oradata02/vote/vote2.Now formatting voting disk: /oradata/oradata03/vote/vote3.CRS-4603: Successful addition of voting disk /oradata/oradata01/vote/vote1.CRS-4603: Successful addition of voting disk /oradata/oradata02/vote/vote2.CRS-4603: Successful addition of voting disk /oradata/oradata03/vote/vote3.## STATE File Universal Id File Name Disk group– —– —————– ——— ———1. ONLINE 08a3980556c04f05bf2286c0ad1a0924 (/oradata/oradata01/vote/vote1) []2. ONLINE 21d4c2b231be4fdcbf4d44a3f19455f2 (/oradata/oradata02/vote/vote2) []3. ONLINE 03619a54a99f4f9fbfc6b22cef4c31da (/oradata/oradata03/vote/vote3) []Located 3 voting disk(s).macleandb-008 # /home/grid/app/oraInventory/orainstRoot.shChanging permissions of /home/grid/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /home/grid/app/oraInventory to oinstall.The execution of the script is complete.macleandb-008 # /oracle/app/product/grid/root.shPerforming root user operation for Oracle 11g
  41. 41. The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /oracle/app/product/gridEnter the full pathname of the local bin directory: [/usr/local/bin]:Creating /usr/local/bin directory…Copying dbhome to /usr/local/bin …Copying oraenv to /usr/local/bin …Copying coraenv to /usr/local/bin …Creating /etc/oratab file…Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Using configuration parameter file: /oracle/app/product/grid/crs/install/crsconfig_paramsCreating trace directoryUser ignored Prerequisites during installationUser grid has the required capabilities to run CSSD in realtime modeOLR initialization – successfulAdding Clusterware entries to inittabCRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon onnode unknown, number unknown, and is terminatingAn active cluster was found during exclusive startup, restarting to join the clusterConfigure Oracle Grid Infrastructure for a Cluster … succeededmacleandb-008 #执行完成上述脚本后在 OUI 图形界面上点击 Finish 完成安装,并验证安装结果:$ crsctl query crs softwareversionOracle Clusterware version on node [macleandb-007] is [11.2.0.3.0]$ crsctl query crs activeversionOracle Clusterware active version on the cluster is [11.2.0.3.0]
  42. 42. $ crsctl stat res -t——————————————————————————–NAME TARGET STATE SERVER STATE_DETAILS——————————————————————————–Local Resources——————————————————————————–ora.LISTENER.lsnrONLINE ONLINE macleandb-007ONLINE ONLINE macleandb-008ora.asmOFFLINE OFFLINE macleandb-007 Instance ShutdownOFFLINE OFFLINE macleandb-008ora.gsdOFFLINE OFFLINE macleandb-007OFFLINE OFFLINE macleandb-008ora.net1.networkONLINE ONLINE macleandb-007ONLINE ONLINE macleandb-008ora.onsONLINE ONLINE macleandb-007ONLINE ONLINE macleandb-008ora.registry.acfsOFFLINE OFFLINE macleandb-007OFFLINE OFFLINE macleandb-008——————————————————————————–Cluster Resources——————————————————————————–ora.LISTENER_SCAN1.lsnr1 ONLINE ONLINE macleandb-007ora.macleandb-007.vip1 ONLINE ONLINE macleandb-007ora.macleandb-008.vip1 ONLINE ONLINE macleandb-008ora.cvu1 ONLINE ONLINE macleandb-007ora.oc4j1 ONLINE ONLINE macleandb-007ora.scan1.vip1 ONLINE ONLINE macleandb-007
  43. 43. $ crsctl stat res -t -init——————————————————————————–NAME TARGET STATE SERVER STATE_DETAILS——————————————————————————–Cluster Resources——————————————————————————–ora.asm1 OFFLINE OFFLINE Instance Shutdownora.cluster_interconnect.haip1 ONLINE ONLINE macleandb-007ora.crf1 ONLINE ONLINE macleandb-007ora.crsd1 ONLINE ONLINE macleandb-007ora.cssd1 ONLINE ONLINE macleandb-007ora.cssdmonitor1 ONLINE ONLINE macleandb-007ora.ctssd1 ONLINE ONLINE macleandb-007 OBSERVERora.diskmon1 OFFLINE OFFLINEora.drivers.acfs1 ONLINE ONLINE macleandb-007ora.evmd1 ONLINE ONLINE macleandb-007ora.gipcd1 ONLINE ONLINE macleandb-007ora.gpnpd1 ONLINE ONLINE macleandb-007ora.mdnsd1 ONLINE ONLINE macleandb-007通过上述命令验证确认 Grid Infrastructure Cluster 版本、状态良好。3. 进一步安装 RDBMS DB Software,运行./runInstaller 启动 OUI 界面
  44. 44. step1 点击 NEXT
  45. 45. Step2 选择 skip software updatesStep3 选择 Install database software only
  46. 46. Step4 选择 RAC 安装 macleandb-007、macleandb-008 2 个节点Step5 选择添加简体中文语音包
  47. 47. Step6 选择安装企业版Step7 选择安装 RDBMS 的 ORACLE_HOME
  48. 48. Step8 选择 dba 为 OSDBA 组Step9 复查安装先决条件,以上 Warning 可以忽略,点击 Ignore ALL 并 NEXT
  49. 49. Step10 Summary 页面点击 InstallStep 11 安装过程完成后,用 root 用户在 2 个节点分别运行$ORACLE_HOME/root.sh,脚本执行完成后RDBMS DB 软件安装完毕。
  50. 50. 4. 使用 DBCA 创建测试用数据库切换至 oracle 用户并执行 dbca 工具:Step0 点选 RAC database
  51. 51. Step1 点选 Create DatabaseStep2 点选 General Purpose
  52. 52. Step3 填入 DB NAME 并加入 macleandb-007、macleandb-008 2 个节点。
  53. 53. Step 4 不配置 Enterprise Manager,并启用 Automatic maintenance TasksStep5 输入 sysdba 密码
  54. 54. Step6 选择使用 OMF,并使用共享文件系统目录存放数据文件Step7 指定 Fast Recovery Area 快速恢复区域目录,及大小
  55. 55. Step8 勾选 Sample Schemas,装载示例模式用以测试性能和可用性Step9 选择合适的 SGA、PGA 内存配置、processes 参数和数据库字符集。
  56. 56. Step10 指定 redolog 文件的大小,过小与的 redolog 不利于性能,这里创建 512MB 一个的 onlineredolog。Step11 勾选 Create Database 点击 FINISH 正式创建数据库
  57. 57. DBCA 完成 create database 工作后,检查创建的测试数据库状态:macleandb-007 # su - grid$ crsctl stat res -t——————————————————————————–NAME TARGET STATE SERVER STATE_DETAILS——————————————————————————–Local Resources——————————————————————————–ora.MAC_LSN.lsnrONLINE ONLINE macleandb-007ONLINE ONLINE macleandb-008ora.LISTENER.lsnrONLINE ONLINE macleandb-007ONLINE ONLINE macleandb-008ora.asm
  58. 58. OFFLINE OFFLINE macleandb-007 Instance ShutdownOFFLINE OFFLINE macleandb-008ora.gsdOFFLINE OFFLINE macleandb-007OFFLINE OFFLINE macleandb-008ora.net1.networkONLINE ONLINE macleandb-007ONLINE ONLINE macleandb-008ora.onsONLINE ONLINE macleandb-007ONLINE ONLINE macleandb-008ora.registry.acfsOFFLINE OFFLINE macleandb-007OFFLINE OFFLINE macleandb-008——————————————————————————–Cluster Resources——————————————————————————–ora.LISTENER_SCAN1.lsnr1 ONLINE ONLINE macleandb-007ora.macleandb-007.vip1 ONLINE ONLINE macleandb-007ora.macleandb-008.vip1 ONLINE ONLINE macleandb-008ora.cvu1 ONLINE ONLINE macleandb-007ora.oc4j1 ONLINE ONLINE macleandb-007ora.scan1.vip1 ONLINE ONLINE macleandb-007ora.testdb.db1 ONLINE ONLINE macleandb-007 Open2 ONLINE ONLINE macleandb-008 Openmacleandb-007 # su - oracle$ srvctl stop database -d testdb$ srvctl start database -d testdb
  59. 59. 上述命令结果显示测试用 TESTDB 状态良好、可用。© 2013, www.askmaclean.com. 版权所有.文章允许转载,但必须以链接方式注明源地址,否则追求法律责任.

×