Oracle 11gR2 RAC 安装流程 - 6

HarmonyOS

  安装Grid

  7.1 解压安装包

  以root身份解压grid安装包和database安装包。

  Node1:

  [root@tim1 ~]#cd /soft[root@tim1 soft]#lsasm linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip linux_11gR2_grid.zip

  [root@tim1 soft]#unzip linux_11gR2_grid.zip[root@tim1 soft]#unzip linux_11gR2_database_1of2.zip[root@tim1 soft]#unzip linux_11gR2_database_2of2.zip7.2 矫正时间

  root用户在Node1和Node2下操作,以Node1的时间为基准,使用date -s命令在两节点上同时进行,误差几秒没关系。

  7.3检查两个节点的共享盘

  看到的共享盘ASMDisk已经准备就绪。

  Node1:

  [root@tim1 ~]#ll /dev/raw/raw*Node2:同上

  [root@tim2 ~]#ll /dev/raw/raw* 两节点看到的盘一致。可以在安装grid 之前先做个检查。

  [root@tim1 ~]# su - grid[grid@tim1 ~]$ cd /soft/grid[grid@tim1 grid]$ ./runcluvfy.sh stage -pre -h[grid@tim1 grid]$ ./runcluvfy.sh stage -pre crsinst -n tim1,tim27.4启动GRID安装界面

  1)启动Xmanager Passive,一般端口是[:0.0]

  DISPLAY的意思是把图形显示到某个客户端上,这里是win7本地

  SCAN Name按照/etc/hosts改。

  Grid只认出了Node1节点,Node2需要手动添加一下。

  公网、私网的网段要正确。

  使用ASM,Oracle11gR2取消了raw选项。

  2)配置yum install安装工具

  yum工具可以自动解决软件包之间的依赖关系,使用之前要先创建软件仓库。

  【创建方法】:

  Node1:(root用户执行)

  [root@tim1 ~]# cd /etc/yum.repos.d进入到该目录下生成一个配置文件:

  [root@tim1 yum.repo]# ls[root@tim1 yum.repos.d]# cp rhel-debuginfo.repo yum.repo[root@tim1 yum.repos.d]#vi yum.repo文件内容改为如下:

  [base]name=Red Hat Enterprise Linuxbaseurl=file:///media/Serverenabled=1gpgcheck=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-releasemedia这个就是安装光盘挂载所在位置,Server下就是一些安装包,S是大写。enabled=1表示启动,gpgcheck=0表示校验关闭。

  把yum.repo复制到Node2

  [root@tim2 ~]# cd /etc/yum.repos.d/[root@tim2 yum.repos.d]# scp tim1:/etc/yum.repos.d/yum.repo ./root@tim1's password: beijingyum.repo 100% 146 0.1KB/s 00:00 Node1:1)分配linux 安装镜像文件给光驱

  这一步相当于把光盘插入光驱。

  2)手工mount光盘

  [root@tim1 yum.repos.d]#mount /dev/cdrom /media查看一下目录下文件,看到许多包,至此,yum仓库构建完成。

  [root@tim1 yum.repos.d]# ls /media/Server

  more 安装时千万不要进入这个目录3)根据Grid安装界面提示,使用yum安装缺失软件包

  [root@tim1 yum.repos.d]# yum install libaio-devel* -y 一定要看到 Complete!才行[root@tim1 yum.repos.d]# yum install sysstat* -y[root@tim1 yum.repos.d]# yum install unixODBC-2* -y[root@tim1 yum.repos.d]# yum install unixODBC-devel* -y[root@tim1 yum.repos.d]# umount /media4)别忘了从虚机中移除光驱,否则下次引导不了磁盘。

  Node2:同上

  【注】:两个节点都要安装这四个包。

  不放心也可以验证一下是否装好了这些包,命令如下:

  [root@tim1 ~]# rpm -qa libaio-devel*Check Again继续安装。

  3)继续安装Grid

  Node1执行第一个脚本(root用户)

  [root@tim1 ~]# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.Node2执行第一个脚本(root用户)

  [root@tim2 ~]# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.Node1 执行第二个脚本(root用户) 【这步才是关键】!!!

  [root@tim1 /]# /u01/11.2.0/grid/root.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.[root@tim1 /]# /u01/11.2.0/grid/root.shRunning Oracle 11g root.sh script...The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /u01/11.2.0/gridEnter the full pathname of the local bin directory: [/usr/local/bin]: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.sh script.Now product-specific root actions will be performed.2022-11-13 00:02:18: Parsing the host name2022-11-13 00:02:18: Checking for super user privileges2022-11-13 00:02:18: User has super user privilegesUsing configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directoryLOCAL ADD MODECreating OCR keys for user 'root', privgrp 'root'..Operation successful.root 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 daemon to inittabCRS-4123: Oracle High Availability Services has been started.ohasd is startingCRS-2672: Attempting to start 'ora.gipcd' on 'tim1'CRS-2672: Attempting to start 'ora.mdnsd' on 'tim1'CRS-2676: Start of 'ora.gipcd' on 'tim1' succeededCRS-2676: Start of 'ora.mdnsd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.gpnpd' on 'tim1'CRS-2676: Start of 'ora.gpnpd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'tim1'CRS-2676: Start of 'ora.cssdmonitor' on 'tim1' succeededCRS-2672: Attempting to start 'ora.cssd' on 'tim1'CRS-2672: Attempting to start 'ora.diskmon' on 'tim1'CRS-2676: Start of 'ora.diskmon' on 'tim1' succeededCRS-2676: Start of 'ora.cssd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.ctssd' on 'tim1'CRS-2676: Start of 'ora.ctssd' on 'tim1' succeededASM created and started successfully.DiskGroup OCR_VOTE created successfully.clscfg: -install mode specifiedSuccessfully accumulated necessary OCR keys.Creating OCR keys for user 'root', privgrp 'root'..Operation successful.CRS-2672: Attempting to start 'ora.crsd' on 'tim1'CRS-2676: Start of 'ora.crsd' on 'tim1' succeededCRS-4256: Updating the profileSuccessful addition of voting disk 4e8f4e6229f84f4abf68122bc013ca1a.Successful addition of voting disk ae254012f9b14f46bf99e51e57d1c57e.Successful addition of voting disk 3d4e443c740f4f83bf4bbaa54dfc5936.Successfully replaced voting disk group with +OCR_VOTE.CRS-4256: Updating the profileCRS-4266: Voting file(s) successfully replaced## STATE File Universal Id File Name Disk group-- ----- ----------------- --------- ---------1. ONLINE 1e7f803c179d4fcfbf2615830d5534cf (/dev/raw/raw1) [OCR_VOTE]2. ONLINE 100a31a3e78a4f81bf4013a1a27c8fce (/dev/raw/raw2) [OCR_VOTE]3. ONLINE 0978acb212554f5ebf5efab28cc6c6a6 (/dev/raw/raw3) [OCR_VOTE]Located 3 voting disk(s).CRS-2673: Attempting to stop 'ora.crsd' on 'tim1'CRS-2677: Stop of 'ora.crsd' on 'tim1' succeededCRS-2673: Attempting to stop 'ora.asm' on 'tim1'CRS-2677: Stop of 'ora.asm' on 'tim1' succeededCRS-2673: Attempting to stop 'ora.ctssd' on 'tim1'CRS-2677: Stop of 'ora.ctssd' on 'tim1' succeededCRS-2673: Attempting to stop 'ora.cssdmonitor' on 'tim1'CRS-2677: Stop of 'ora.cssdmonitor' on 'tim1' succeededCRS-2673: Attempting to stop 'ora.cssd' on 'tim1'CRS-2677: Stop of 'ora.cssd' on 'tim1' succeededCRS-2673: Attempting to stop 'ora.gpnpd' on 'tim1'CRS-2677: Stop of 'ora.gpnpd' on 'tim1' succeededCRS-2673: Attempting to stop 'ora.gipcd' on 'tim1'CRS-2677: Stop of 'ora.gipcd' on 'tim1' succeededCRS-2673: Attempting to stop 'ora.mdnsd' on 'tim1'CRS-2677: Stop of 'ora.mdnsd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.mdnsd' on 'tim1'CRS-2676: Start of 'ora.mdnsd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.gipcd' on 'tim1'CRS-2676: Start of 'ora.gipcd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.gpnpd' on 'tim1'CRS-2676: Start of 'ora.gpnpd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'tim1'CRS-2676: Start of 'ora.cssdmonitor' on 'tim1' succeededCRS-2672: Attempting to start 'ora.cssd' on 'tim1'CRS-2672: Attempting to start 'ora.diskmon' on 'tim1'CRS-2676: Start of 'ora.diskmon' on 'tim1' succeededCRS-2676: Start of 'ora.cssd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.ctssd' on 'tim1'CRS-2676: Start of 'ora.ctssd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.asm' on 'tim1'CRS-2676: Start of 'ora.asm' on 'tim1' succeededCRS-2672: Attempting to start 'ora.crsd' on 'tim1'CRS-2676: Start of 'ora.crsd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.evmd' on 'tim1'CRS-2676: Start of 'ora.evmd' on 'tim1' succeededCRS-2672: Attempting to start 'ora.asm' on 'tim1'CRS-2676: Start of 'ora.asm' on 'tim1' succeededCRS-2672: Attempting to start 'ora.OCR_VOTE.dg' on 'tim1'CRS-2676: Start of 'ora.OCR_VOTE.dg' on 'tim1' succeededCRS-2672: Attempting to start 'ora.registry.acfs' on 'tim1'CRS-2676: Start of 'ora.registry.acfs' on 'tim1' succeededtim1 2022/11/13 00:09:21 /u01/11.2.0/grid/cdata/tim1/backup_20221113_000921.olrPreparing packages for installation...cvuqdisk-1.0.7-1Configure Oracle Grid Infrastructure for a Cluster ... succeededUpdating inventory properties for clusterwareStarting Oracle Universal Installer...Checking swap space: must be greater than 500 MB. Actual 4095 MB PassedThe inventory pointer is located at /etc/oraInst.locThe inventory is located at /u01/app/oraInventory'UpdateNodeList' was successful.Node2 执行第二个脚本(root用户)

  [root@tim2 ~]# /u01/11.2.0/grid/root.shRunning Oracle 11g root.sh script...The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /u01/11.2.0/gridEnter the full pathname of the local bin directory: [/usr/local/bin]: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.sh script.Now product-specific root actions will be performed.2022-11-13 00:15:30: Parsing the host name2022-11-13 00:15:30: Checking for super user privileges2022-11-13 00:15:30: User has super user privilegesUsing configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directoryLOCAL ADD MODECreating OCR keys for user 'root', privgrp 'root'..Operation successful.Adding daemon to inittabCRS-4123: Oracle High Availability Services has been started.ohasd is startingCRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on Node tim1, number 1, and is terminatingAn active cluster was found during exclusive startup, restarting to join the clusterCRS-2672: Attempting to start 'ora.mdnsd' on 'tim2'CRS-2676: Start of 'ora.mdnsd' on 'tim2' succeededCRS-2672: Attempting to start 'ora.gipcd' on 'tim2'CRS-2676: Start of 'ora.gipcd' on 'tim2' succeededCRS-2672: Attempting to start 'ora.gpnpd' on 'tim2'CRS-2676: Start of 'ora.gpnpd' on 'tim2' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'tim2'CRS-2676: Start of 'ora.cssdmonitor' on 'tim2' succeededCRS-2672: Attempting to start 'ora.cssd' on 'tim2'CRS-2672: Attempting to start 'ora.diskmon' on 'tim2'CRS-2676: Start of 'ora.diskmon' on 'tim2' succeededCRS-2676: Start of 'ora.cssd' on 'tim2' succeededCRS-2672: Attempting to start 'ora.ctssd' on 'tim2'CRS-2676: Start of 'ora.ctssd' on 'tim2' succeededCRS-2672: Attempting to start 'ora.drivers.acfs' on 'tim2'CRS-2676: Start of 'ora.drivers.acfs' on 'tim2' succeededCRS-2672: Attempting to start 'ora.asm' on 'tim2'CRS-2676: Start of 'ora.asm' on 'tim2' succeededCRS-2672: Attempting to start 'ora.crsd' on 'tim2'CRS-2676: Start of 'ora.crsd' on 'tim2' succeededCRS-2672: Attempting to start 'ora.evmd' on 'tim2'CRS-2676: Start of 'ora.evmd' on 'tim2' succeededtim2 2022/11/13 00:20:09 /u01/11.2.0/grid/cdata/tim2/backup_20221113_002009.olrPreparing packages for installation...cvuqdisk-1.0.7-1Configure Oracle Grid Infrastructure for a Cluster ... succeededUpdating inventory properties for clusterwareStarting Oracle Universal Installer...Checking swap space: must be greater than 500 MB. Actual 4095 MB PassedThe inventory pointer is located at /etc/oraInst.locThe inventory is located at /u01/app/oraInventory'UpdateNodeList' was successful.[root@tim2 /]#

  最后一步,点击Close,结束图形安装。

  4)添加全局环境变量

  目的是让root用户能找到Grid用户路径下的可执行文件。

  Node1:

  [root@tim1 ~]# vi /etc/profile添加:export PATH=$PATH:/u01/11.2.0/grid/bin[root@tim1 ~]# source /etc/profileNode2:同上

  两个节点分别自动启动CRS。

  一共有四个OFFLINE,这是正常的。

  至此,grid全部安装完成。

  the !!!

  @jackman 共筑美好!

标签: HarmonyOS