Install Oracle Grid Infrastructure 12cR2 OL7


#1

Oracle Linux 7 дээр 2 гишүүн бүхий Oracle Grid Infrastructure (GI) 12cR2 хэрхэн суулгах алхамуудыг танилцуулъя.

Бэлтгэл ажил:

Багадаа Public болон Private сүлжээ, 8ГБ санах ой бүхий 2 сервер шаардлагатай.

swap хангалттай хэмжээ бүхий байх шаардлагатай. Энд дарж хэрхэн хэмжээг нэмэх талаар харна уу.

DNS тохиргоог дараах байдлаар бэлтгэнэ. DNS хэрхэн тохируулах талаар энд дарж харна уу.

########### ORACLE 12CR2 RAC ###############
# Public
192.168.88.11   rac-node01.oracloud.mn        rac-node01
192.168.88.12   rac-node02.oracloud.mn        rac-node02
192.168.88.13   rac-node03.oracloud.mn        rac-node03
192.168.88.14   rac-node04.oracloud.mn        rac-node04

# Private
10.10.10.11	rac-node01-priv.oracloud.mn rac-node01-priv
10.10.10.12	rac-node02-priv.oracloud.mn rac-node02-priv
10.10.10.13	rac-node03-priv.oracloud.mn rac-node03-priv
10.10.10.14	rac-node04-priv.oracloud.mn rac-node04-priv

# Virtual
192.168.88.21     rac-node01-vip.oracloud.mn rac-node01-vip
192.168.88.22     rac-node02-vip.oracloud.mn rac-node02-vip
192.168.88.23     rac-node03-vip.oracloud.mn rac-node03-vip
192.168.88.24     rac-node04-vip.oracloud.mn rac-node04-vip

# SCAN
192.168.88.25   rac-scan.oracloud.mn	rac-scan
192.168.88.26   rac-scan.oracloud.mn	rac-scan
192.168.88.27   rac-scan.oracloud.mn	rac-scan

ASM дискүүдийг бэлдсэн байх шаардлагатай. GI 12cR2 хувилбараас эхэлэн GI өөрийн менежмент баазыг ашигладаг болсон тул уг бааз нь хамгийн багадаа 37ГБ дискийн зайг шаардахыг анхаарна уу

ASM дискийг шалгах:

oracleasm listdisks
oracleasm status

GI программыг татаж бэлтгэнэ. Grid Home хавтсанд задалж хуулна.

GRID_HOME = /u01/app/12.2.0.1/grid/
ORACLE_BASE = /u01/app/oracle

Үйлдлийн системийн тохиргоог бэлтгэж шаардлагатай груп хэрэглэгч нарыг үүсгэнэ.

[root@rac-node01 ~]$ yum search preinstall
Loaded plugins: ulninfo
======================================================= N/S matched: preinstall =======================================================
oracle-database-server-12cR2-preinstall.x86_64 : Sets the system for Oracle Database single instance and Real Application Cluster
                                               : install for Oracle Linux 7
oracle-rdbms-server-11gR2-preinstall.x86_64 : Sets the system for Oracle single instance and Real Application Cluster install for
                                            : Oracle Linux 7
oracle-rdbms-server-12cR1-preinstall.x86_64 : Sets the system for Oracle Database single instance and Real Application Cluster install
                                            : for Oracle Linux 7

  Name and summary matches only, use "search all" for everything.
[root@rac-node01 ~]$ yum install oracle-database-server-12cR2-preinstall.x86_64 -y

oracle-database-server-12cR2-preinstall.x86_64 багц нь шаардлагатай сан болон бусад зүйлсийг суулгахаас гадна oracle хэрэглэгч болон группуудыг үүсгэж бэлтгэх бөгөөд grid хэрэглэгчийг үүсгэхгүйг анхаарах хэрэгтэй. Тиймээс бид grid хэрэглэгчийн өөрсдөө бүх сервер дээр дараах коммандаар үүсгэж өгнө.

useradd grid
usermod -a -G oinstall,dba grid

oracle, grid хэрэглэгчийн нууц үгсийг солино. Бүх нууц үг хэрэглэгч нарын хувьд ижил байх ёстойг анхаарна уу.

passwd grid
passwd oracle

Суулгахад шаардлагатай тохиргоонуудыг хийж дууссан бол grid хэрэглэгчээр нэвтрэн орж коммандын мөрнөөс GRID_HOME дотроос gridSetup.sh файлыг ажиллуулна.

[grid@rac-node01 ~]$ cd /u01/app/12.2.0.1/grid/
[grid@rac-node01 grid]$ ./gridSetup.sh
Launching Oracle Grid Infrastructure Setup Wizard...

You can find the log of this install session at:
 /tmp/GridSetupActions2018-04-15_02-08-16PM/gridSetupActions2018-04-15_02-08-16PM.log

Уг комманд суулгах явцын цонх гаргаж ирэх бөгөөд зургаар ямар тохиргоо байх шаардлагатайг харуулж шаардлагатай хэсгүүдийг зургийн дугаарын дагуу тайлбарлая.

Зураг 1:

Зураг 2:

Зураг 3:


Энэ хэсэгт cluster нэр SCAN нэр зөв тохируулах шаардлагатай бөгөөд эдгээрийг DNS -д тохируулж өгсөн байна.

Зураг 4:


Cluster-ийн бусад node-үүдийг нэмж өгнө. Add дарснаар hostname болон vip-hostname үүдийг оруулж өгнө.

Зураг 5:


DNS хэсгээс ашиглагдаж буй нэршил болон IP хаягнуудыг харна уу

Зураг 6:


SSH connectivity товчлуур дээр дарснаар серверүүд хоорондоо нууц үггүй хандах тохиргоо болсон эсэхийг шалгаж болох бөгөөд Test товчлуурыг дарж шалгахад алдаа гарч байвал grid хэрэглэгчийн нууц үгсийг оруулж Setup товчлуурын тусламжтай тохируулна. Зураг 8-ийг харна уу.

Зураг 7:

Зураг 8:

Зураг 9:


Public, Private сүлжээг тохируулж өгнө.

Зураг 10:

Зураг 11:

Зураг 12:


Change Discovery Path товчлуурыг дарж ASM дискийн замыг оруулж өгснөөр дискүүд орж ирнэ.

Зураг 13:


DATA диск груп-д ашиглах дискүүдийг сонгож өгнө. Production орчинд External тохиргоог ашиглаж болохгүй. Энэ нь бүх дискийн нийлүүлж нэг диск шиг болгож ашиглагдах бөгөөд ямар нэгэн хуулбар ашиглагдахгүй тул эрсдэлтэй. Ядаж NORMAL тохиргоог ашиглах хэрэгтэй.

Зураг 14:


GI -д зориулагдсан management database-ийг хаана хадгалахыг тохируулж өгнө. Багадаа 37ГБ зай шаардана.

Зураг 15:


ASM удирдах нууц үгийг оруулж өгнө.

Зураг 16:

Зураг 17:

Зураг 18:

Зураг 19:


ORACLE_BASE-ийг анхааралтай зөв тохируулж өгөх шаардлагатай.

Зураг 20:

Зураг 21:

Зураг 22:

Зураг 23:


Хэрэв үйлдлийн системийн түвшинд суугаагүй сан болон бусад системд нөлөөлж болох зүйлс дээр анхааруулга гарч байвал уг асуудлыг заавал шийдвэрлэх шаардлагатай.

Зураг 24:


Тохиргоонуудаа шалгаад зөв бол үргэлжлүүлнэ.

Зураг 25:

Зураг 26:


Суулгах явцад root хэрэглэгчээр ажиллуулах шаардлагатай скриптийн замыг аль серверүүд дээр ажиллуулах талаар гарч ирэх бөгөөд Nodes хэсэгт буй нэрсийн дарааллаар эхний комманд ажиллаж дууссаны дараа дараагийн коммандыг ажиллуулах зарчмаар ажиллуулна.

[root@rac-node01 grid]$ /u01/app/oraInventory/orainstRoot.sh
Changing 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 grid.
The execution of the script is complete.

GRID_HOME -с ажиллах скрипт олон үйлдэл хийх тул удаан ажиллах бөгөөд бүгдийг ажиллуулж дууссанаар ОК дарна.

[root@rac-node01 grid]$ /u01/app/12.2.0.1/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/12.2.0.1/grid

Enter 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 by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Using configuration parameter file: /u01/app/12.2.0.1/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/oracle/crsdata/rac-node01/crsconfig/rootcrs_rac-node01_2018-04-15_02-24-23PM.log
2018/04/15 14:24:30 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2018/04/15 14:24:30 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2018/04/15 14:24:55 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2018/04/15 14:24:55 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2018/04/15 14:24:59 CLSRSC-363: User ignored prerequisites during installation
2018/04/15 14:24:59 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2018/04/15 14:25:01 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2018/04/15 14:25:02 CLSRSC-594: Executing installation step 5 of 19: 'SaveParamFile'.
2018/04/15 14:25:08 CLSRSC-594: Executing installation step 6 of 19: 'SetupOSD'.
2018/04/15 14:25:09 CLSRSC-594: Executing installation step 7 of 19: 'CheckCRSConfig'.
2018/04/15 14:25:09 CLSRSC-594: Executing installation step 8 of 19: 'SetupLocalGPNP'.
2018/04/15 14:25:30 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2018/04/15 14:25:42 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2018/04/15 14:25:42 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2018/04/15 14:25:48 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2018/04/15 14:26:04 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2018/04/15 14:27:27 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2018/04/15 14:27:38 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac-node01'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac-node01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2018/04/15 14:29:03 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2018/04/15 14:29:08 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac-node01'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac-node01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.evmd' on 'rac-node01'
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac-node01'
CRS-2676: Start of 'ora.evmd' on 'rac-node01' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac-node01'
CRS-2676: Start of 'ora.gpnpd' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac-node01'
CRS-2672: Attempting to start 'ora.gipcd' on 'rac-node01'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac-node01' succeeded
CRS-2676: Start of 'ora.gipcd' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac-node01'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac-node01'
CRS-2676: Start of 'ora.diskmon' on 'rac-node01' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac-node01' succeeded

Disk groups created successfully. Check /u01/app/oracle/cfgtoollogs/asmca/asmca-180415PM032944.log for details.


2018/04/15 14:30:46 CLSRSC-482: Running command: '/u01/app/12.2.0.1/grid/bin/ocrconfig -upgrade grid grid'
CRS-2672: Attempting to start 'ora.crf' on 'rac-node01'
CRS-2672: Attempting to start 'ora.storage' on 'rac-node01'
CRS-2676: Start of 'ora.storage' on 'rac-node01' succeeded
CRS-2676: Start of 'ora.crf' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'rac-node01'
CRS-2676: Start of 'ora.crsd' on 'rac-node01' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk a909a365f5024fc5bf31879918b9fb53.
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   a909a365f5024fc5bf31879918b9fb53 (/dev/oracleasm/disks/DISKI) [DATA]
Located 1 voting disk(s).
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac-node01'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac-node01'
CRS-2677: Stop of 'ora.crsd' on 'rac-node01' succeeded
CRS-2673: Attempting to stop 'ora.storage' on 'rac-node01'
CRS-2673: Attempting to stop 'ora.crf' on 'rac-node01'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac-node01'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac-node01'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac-node01'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac-node01' succeeded
CRS-2677: Stop of 'ora.crf' on 'rac-node01' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac-node01' succeeded
CRS-2677: Stop of 'ora.storage' on 'rac-node01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac-node01'
CRS-2677: Stop of 'ora.mdnsd' on 'rac-node01' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac-node01' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac-node01'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac-node01' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac-node01'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac-node01'
CRS-2677: Stop of 'ora.evmd' on 'rac-node01' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac-node01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac-node01'
CRS-2677: Stop of 'ora.cssd' on 'rac-node01' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac-node01'
CRS-2677: Stop of 'ora.gipcd' on 'rac-node01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac-node01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2018/04/15 14:32:32 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac-node01'
CRS-2672: Attempting to start 'ora.evmd' on 'rac-node01'
CRS-2676: Start of 'ora.mdnsd' on 'rac-node01' succeeded
CRS-2676: Start of 'ora.evmd' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac-node01'
CRS-2676: Start of 'ora.gpnpd' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'rac-node01'
CRS-2676: Start of 'ora.gipcd' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac-node01'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac-node01'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac-node01'
CRS-2676: Start of 'ora.diskmon' on 'rac-node01' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'rac-node01'
CRS-2672: Attempting to start 'ora.ctssd' on 'rac-node01'
CRS-2676: Start of 'ora.ctssd' on 'rac-node01' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rac-node01'
CRS-2676: Start of 'ora.asm' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'rac-node01'
CRS-2676: Start of 'ora.storage' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'rac-node01'
CRS-2676: Start of 'ora.crf' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'rac-node01'
CRS-2676: Start of 'ora.crsd' on 'rac-node01' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: rac-node01
CRS-6016: Resource auto-start has completed for server rac-node01
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2018/04/15 14:34:29 CLSRSC-343: Successfully started Oracle Clusterware stack
2018/04/15 14:34:29 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac-node01'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rac-node01'
CRS-2676: Start of 'ora.asm' on 'rac-node01' succeeded
CRS-2672: Attempting to start 'ora.DATA.dg' on 'rac-node01'
CRS-2676: Start of 'ora.DATA.dg' on 'rac-node01' succeeded
2018/04/15 14:36:42 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.



2018/04/15 14:37:26 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@rac-node01 grid]$ 

Зураг 27:

Зураг 28:

Зураг 29:

Close дарж суулгацыг дуусгах бөгөөд дараах rac-node01 дээрээс дараах коммандаар шалгана.

[grid@rac-node01 grid]$ . oraenv
ORACLE_SID = [grid] ? +ASM1
The Oracle base has been set to /u01/app/oracle
[grid@rac-node01 grid]$
[grid@rac-node01 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       rac-node01               STABLE
               ONLINE  ONLINE       rac-node02               STABLE
ora.DATA.dg
               ONLINE  ONLINE       rac-node01               STABLE
               ONLINE  ONLINE       rac-node02               STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac-node01               STABLE
               ONLINE  ONLINE       rac-node02               STABLE
ora.MGMT.dg
               ONLINE  ONLINE       rac-node01               STABLE
               ONLINE  ONLINE       rac-node02               STABLE
ora.chad
               ONLINE  ONLINE       rac-node01               STABLE
               ONLINE  ONLINE       rac-node02               STABLE
ora.net1.network
               ONLINE  ONLINE       rac-node01               STABLE
               ONLINE  ONLINE       rac-node02               STABLE
ora.ons
               ONLINE  ONLINE       rac-node01               STABLE
               ONLINE  ONLINE       rac-node02               STABLE
ora.proxy_advm
               OFFLINE OFFLINE      rac-node01               STABLE
               OFFLINE OFFLINE      rac-node02               STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac-node02               STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac-node01               STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac-node01               STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       rac-node01               169.254.113.254 10.1
                                                             0.10.11 10.10.10.111
                                                             ,STABLE
ora.asm
      1        ONLINE  ONLINE       rac-node01               Started,STABLE
      2        ONLINE  ONLINE       rac-node02               Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       rac-node01               STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       rac-node01               Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac-node01               STABLE
ora.rac-node01.vip
      1        ONLINE  ONLINE       rac-node01               STABLE
ora.rac-node02.vip
      1        ONLINE  ONLINE       rac-node02               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac-node02               STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       rac-node01               STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       rac-node01               STABLE
--------------------------------------------------------------------------------
[grid@rac-node01 ~]$

Бүгд сайхан ажиллаж байна. Амжилт хүсье.