aix6.1+grid+rac+oracle 11g安装配置手册
系统架构摘要aix 6100-004+oracle grid 11gr2+oraclerac+oracle databasehostname oradb1 oradb2IP address:10.1.1.71 oradb2 10.1.1.73 oradb2vip 192.168.101.71 oradb2priv 10.1.1.70 oradb1 192.168.101.70 oradb1priv 10.1.1.72 oradb1vip 10.1.1.74 oracrs用户:root/rootgrid/gridoracle/oracle 安装前准备工作/usr/sbin/lsattr -E -l sys0 -a realmem/usr/sbin/lsps -alsattr -El rhdisk3 -a size_mb 编辑/etc/hostsvi /etc/hosts加入: 10.1.1.71 oradb2 10.1.1.73 oradb2vip 192.168.101.71 oradb2priv 10.1.1.70 oradb1 192.168.101.70 oradb1priv 10.1.1.72 oradb1vip 10.1.1.74 oracrs ----安装SSH的软件包及配置在AIX Toolboxfor Linux Applications盘上,安装SSH的前提包openssl-0.9.7gopenssl-devel-0.9.7gopenssl-doc-0.9.7g 在扩展盘上openssh.baseopenssh.licenseopenssh.man.en_US FIXPACKIZ39665IZ29348IZ55160 调整用户的SHELLLimit修改/etc/security/limits文件中root oracle用户相关部分如下:root:fsize = -1core = -1cpu = -1data = -1rss = -1stack = -1nofiles = -1 oracle:fsize = -1core = -1cpu = -1data = -1rss = -1stack = -1nofiles = -1 调整系统参数lsattr -E -l sys0 -a maxuproc/usr/sbin/chdev -l sys0 -a maxuproc=16384/usr/sbin/no -r -o ipqmaxlen=512/usr/sbin/no -p -o udp_sendspace=65536/usr/sbin/no -p -o udp_recvspace=655360/usr/sbin/no -p -o tcp_sendspace=65536/usr/sbin/no -p -o tcp_recvspace=65536/usr/sbin/no -p -o rfc1323=1/usr/sbin/no -p -o sb_max=1301720 创建oinstall、dbamkgroup -A id=1000 oinstall mkgroup -A id=1200 dbamkuser id=1100 pgrp=oinstall groups=dbahome='/home/grid' gridmkuser id=1101 pgrp=oinstall groups=dbahome='/home/oracle' oraclemkdir -p /oracle/gridchown -R grid:oinstall /oraclemkdir /oracle/appchown oracle:oinstall /oracle/appchmod -R 775 /oracle/passwd gridpasswd oraclelsuser -a capabilities gridchusercapabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE grid 验证oracle用户# id oracleuid=500(oracle) gid=202(oinstall)groups=203(dba)保证各节点都一样,并设置密码passwdoracle Grid安装配置 1. 设置ASM设备/usr/sbin/chdev -l hdisk2 -a pv=clear/usr/sbin/chdev -l hdisk3 -a pv=clear/usr/sbin/chdev -l hdisk4 -a pv=clear/usr/sbin/chdev -l hdisk5 -a pv=clearchdev -l hdisk2 -a pv=yeschdev -l hdisk3 -a pv=yeschdev -l hdisk4 -a pv=yeschdev -l hdisk5 -a pv=yes准备asm磁盘chown grid:oinstall /dev/rhdisk3chmod 660 /dev/rhdisk3chdev -l hdisk3 -areserve_policy=no_reserve 2. 用户配置文件vi .profile[size=7.5pt]PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.[size=7.5pt]if [ -s "$MAIL" ] # This is at Shell startup. In normal[size=7.5pt]then echo "$MAILMSG" # operation, the Shell checks[size=7.5pt]fi # periodically.[size=7.5pt]export ORACLE_BASE=/oracle/app[size=7.5pt]export ORACLE_HOME=/oracle/grid[size=7.5pt]umask 022[size=7.5pt]PATH=$PATH:/oracle/grid/bin[size=7.5pt]export PATH[size=7.5pt]export TEMP=/tmp[size=7.5pt]export TMPDIR=/tmp 3. 分别在两台主机上运行如下命令配置grid用户的ssh互信,注意只能一条条运行,不能一次全部复制运行 mkdir~/.ssh chmod700 ~/.ssh /usr/bin/ssh-keygen-t rsa /usr/bin/ssh-keygen-t dsa在oradb1上,一条条分别依次执行。cd ~/.sshssh oradb1 cat/home/grid/.ssh/id_rsa.pub>>authorized_keysssh oradb1 cat /home/grid/.ssh/id_dsa.pub>>authorized_keysssh oradb2 cat/home/grid/.ssh/id_rsa.pub>>authorized_keysssh oradb2 cat/home/grid/.ssh/id_dsa.pub>>authorized_keysscp authorized_keys oradb2:/home/grid/.ssh/chmod 600 authorized_keys在两台服务器上全部执行如下操作,验证互信效果:ssh oradb1 datessh oradb2 date如果不提示输入密码,证明互信效果完成。 4. 准备安装介质:Mount /cdrom5. 执行安装/cdrom/runInstaller,根据提示用root用户执行相应的命令。安装步骤:5.1. [img=358,132]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg[/img][img=372,159]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image004.jpg[/img][img=504,301]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image006.jpg[/img] 5.2. scan-name 是hosts文件中定义的ip别名oracrs[img=396,254]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image008.jpg[/img]5.3. 确认网卡public,private属性。[img=444,250]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image010.jpg[/img]5.4. 设置asm存储,管理员密码oracle[img=420,269]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image012.jpg[/img]5.5. 选择rhdisk3,external5.6. 安装,[img=372,260]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image014.jpg[/img] [img=384,197]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image016.jpg[/img] 5.7. 安装主界面[img=404,251]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image018.jpg[/img][img=408,312]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image020.jpg[/img] 5.8. 运行orainstRoot.sh和root.sh脚本[img=408,343]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image022.jpg[/img] [img=444,248]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image024.jpg[/img][img=444,227]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image026.jpg[/img] Root.sh输出[table=98%,rgb(12, 12, 12)]
[td=568] # root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /oracle/grid Enter the full pathname of the local bin directory: [/usr/local/bin]: The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying dbhome to /usr/local/bin ... The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying oraenv to /usr/local/bin ... The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. 2010-07-07 11:06:16: Parsing the host name 2010-07-07 11:06:16: Checking for super user privileges 2010-07-07 11:06:16: User has super user privileges Using configuration parameter file: /oracle/grid/crs/install/crsconfig_params Creating trace directory User grid has the required capabilities to run CSSD in realtime mode LOCAL ADD MODE Creating OCR keys for user 'root', privgrp 'system'.. Operation successful. root wallet root wallet cert root cert export peer wallet profile reader wallet pa wallet peer wallet keys pa wallet keys peer cert request pa cert request peer cert pa cert peer root cert TP profile reader root cert TP pa root cert TP peer pa cert TP pa peer cert TP profile reader pa cert TP profile reader peer cert TP peer user cert pa user cert Adding daemon to inittab CRS-4123: Oracle High Availability Services has been started. ohasd is starting CRS-2672: Attempting to start 'ora.gipcd' on 'oradb1' CRS-2672: Attempting to start 'ora.mdnsd' on 'oradb1' CRS-2676: Start of 'ora.gipcd' on 'oradb1' succeeded CRS-2676: Start of 'ora.mdnsd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oradb1' CRS-2676: Start of 'ora.gpnpd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oradb1' CRS-2676: Start of 'ora.cssdmonitor' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'oradb1' CRS-2672: Attempting to start 'ora.diskmon' on 'oradb1' CRS-2676: Start of 'ora.diskmon' on 'oradb1' succeeded CRS-2676: Start of 'ora.cssd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'oradb1' CRS-2676: Start of 'ora.ctssd' on 'oradb1' succeeded ASM created and started successfully. DiskGroup DATA created successfully. clscfg: -install mode specified Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'system'.. Operation successful. CRS-2672: Attempting to start 'ora.crsd' on 'oradb1' CRS-2676: Start of 'ora.crsd' on 'oradb1' succeeded CRS-4256: Updating the profile Successful addition of voting disk 684355db83624ff6bf9f365761e9abeb. Successfully replaced voting disk group with +DATA. CRS-4256: Updating the profile CRS-4266: Voting file(s) successfully replaced ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 684355db83624ff6bf9f365761e9abeb (/dev/rhdisk3) [DATA] Located 1 voting disk(s). CRS-2673: Attempting to stop 'ora.crsd' on 'oradb1' CRS-2677: Stop of 'ora.crsd' on 'oradb1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'oradb1' CRS-2677: Stop of 'ora.asm' on 'oradb1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'oradb1' CRS-2677: Stop of 'ora.ctssd' on 'oradb1' succeeded CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oradb1' CRS-2677: Stop of 'ora.cssdmonitor' on 'oradb1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'oradb1' CRS-2677: Stop of 'ora.cssd' on 'oradb1' succeeded CRS-2673: Attempting to stop 'ora.gpnpd' on 'oradb1' CRS-2677: Stop of 'ora.gpnpd' on 'oradb1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'oradb1' CRS-2677: Stop of 'ora.gipcd' on 'oradb1' succeeded CRS-2673: Attempting to stop 'ora.mdnsd' on 'oradb1' CRS-2677: Stop of 'ora.mdnsd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.mdnsd' on 'oradb1' CRS-2676: Start of 'ora.mdnsd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'oradb1' CRS-2676: Start of 'ora.gipcd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oradb1' CRS-2676: Start of 'ora.gpnpd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oradb1' CRS-2676: Start of 'ora.cssdmonitor' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'oradb1' CRS-2672: Attempting to start 'ora.diskmon' on 'oradb1' CRS-2676: Start of 'ora.diskmon' on 'oradb1' succeeded CRS-2676: Start of 'ora.cssd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'oradb1' CRS-2676: Start of 'ora.ctssd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oradb1' CRS-2676: Start of 'ora.asm' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'oradb1' CRS-2676: Start of 'ora.crsd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'oradb1' CRS-2676: Start of 'ora.evmd' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oradb1' CRS-2676: Start of 'ora.asm' on 'oradb1' succeeded CRS-2672: Attempting to start 'ora.DATA.dg' on 'oradb1' CRS-2676: Start of 'ora.DATA.dg' on 'oradb1' succeeded oradb1 2010/07/07 11:15:10 /oracle/grid/cdata/oradb1/backup_20100707_111510.olr Configure Oracle Grid Infrastructure for a Cluster ... succeeded Updating inventory properties for clusterware Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 8192 MB Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /oracle/oraInventory 'UpdateNodeList' was successful. #
5.9. grid安装完成验证crs/oracle/grid/bin/rsctl check crsCRS-4638: Oracle High Availability Servicesis onlineCRS-4537: Cluster Ready Services is onlineCRS-4529: Cluster Synchronization Servicesis onlineCRS-4533: Event Manager is online Rac+Database安装配置1. root用户mount /cdrom,运行/cdrom/rootpre.sh2. 使用oracle用户运行/cdrom/runInstaller[img=553,315]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image028.jpg[/img]3. 安装界面:[img=408,281]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image030.jpg[/img][img=492,290]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image032.jpg[/img][img=553,321]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image034.jpg[/img][img=553,339]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image036.jpg[/img][img=553,291]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image038.jpg[/img][img=553,248]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image040.jpg[/img] [img=553,280]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image042.jpg[/img][img=553,300]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image044.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image046.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image048.jpg[/img][img=553,342]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image050.jpg[/img][img=553,270]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image052.jpg[/img][img=553,280]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image054.jpg[/img][img=553,269]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image056.jpg[/img][img=553,290]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image058.jpg[/img]建库操作[img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image060.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image062.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image064.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image066.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image068.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image070.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image072.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image074.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image076.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image078.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image080.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image082.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image084.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image086.jpg[/img][img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image088.jpg[/img] Em(密码oracle)https://10.1.1.70:1158/em[img=553,368]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image090.jpg[/img] 官方文档网站[img=553,415]file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image092.jpg[/img]