【Oracle】19c onpremiss Grid Infrastructure（Standalone Cluster）install

OS周りの設定はほぼいつも通りに済ませる

1.As the grid user, download the Oracle Grid Infrastructure image files and extract the files into the Grid home

```
[root@host01 ~]# ls -l /tmp/LINUX.X64_193000_grid_home.zip
-rw-r--r--. 1 root root 2889184573  4月 28 23:58 /tmp/LINUX.X64_193000_grid_home.zip
[root@host01 ~]# ls -ld /u01/app/19.3.0/grid/
drwxrwxr-x. 2 grid oinstall 6  4月 28 16:34 /u01/app/19.3.0/grid/
[root@host01 grid]# sudo su - grid
最終ログイン: 2019/04/28 (日) 16:48:20 JST日時 pts/0
[grid@host01 ~]$ cd /u01/app/19.3.0/grid/
[grid@host01 grid]$
[grid@host01 grid]$ unzip -q /tmp/LINUX.X64_193000_grid_home.zip
[grid@host01 grid]$
```
2.Log in as the grid user, and start the Oracle Grid Infrastructure installer by running the following command:

<img width="735" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/a2efbb1c-2206-a110-3670-d6051e91c08a.png">

<img width="807" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/81cb0af1-cff3-aeab-d0c4-e01b31ee3d55.png">
あ！日本語対応してる

<img width="802" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/f273d8ad-c9d2-b443-b786-b987dbe68f4f.png">

<img width="859" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/0483c125-21f2-7e1d-f2c8-353a0908077e.png">

<img width="859" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/90b2b491-cf01-fcf9-21bb-54eb31de523f.png">

<img width="861" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/cf99d4c4-b3cb-6c6f-2c7a-bd5cd6960bbc.png">

<img width="859" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/cd7c755f-5ca1-5c2c-d628-16f249f87c69.png">

<img width="863" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/6b6afd8e-981f-8afc-7b36-51aaab60cd54.png">

<img width="861" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/dd9f8210-2231-cf03-8d95-2e86cda9cac5.png">

<img width="860" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/7e8088bc-05da-d106-b529-de37ad902c70.png">

<img width="861" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/a3858fe4-a098-38b9-83b8-df30cb8abb75.png">

<img width="955" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/017fc4d4-5643-36cf-58db-9325d3ded637.png">

<img width="955" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/fe554a46-672e-4991-3a13-635f63ff9092.png">

<img width="957" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/c4a6ee1f-440b-b68c-ed1c-2ff0fa0bc2b2.png">

<img width="802" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/d37ad869-84b3-4945-a24c-9e9571ae1bcc.png">

<img width="802" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/94d0f74d-79a0-9cee-9a1e-eae14a4217c6.png">

<img width="801" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/437dd425-e15a-9b2f-3cca-a764390f2655.png">

<img width="801" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/cae51911-03f5-0a27-1181-930f2d9d07e4.png">

<img width="802" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/44bdbcbf-4844-529b-4320-2a36243ff89d.png">

<img width="801" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/180c7b2e-8538-5370-ca03-737ee2a98d07.png">

<img width="802" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/007cc52c-ed8d-c37e-4be9-48b94d2db3da.png">

<img width="801" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/8f6a7e21-bb22-5c41-ac70-cec5c8c510a0.png">

<img width="947" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/935a4bbd-7ed7-799c-5529-1c05e338ce7e.png">

<img width="941" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/1f4a8d5a-7a07-a88e-3ee2-de05c91481ff.png">

<img width="941" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/bbcb892f-cf2d-f0d0-3dd8-c78a05c8a45d.png">

<img width="801" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/9039c1cb-3a1c-e9f0-bb29-e6994bd1948a.png">
まだ、32%

```
[root@host01 grid]# /u01/app/oraInventory/orainstRoot.sh
権限を変更中 /u01/app/oraInventory.
グループの読取り/書込み権限を追加中。
全ユーザーの読取り/書込み/実行権限を削除中。

グループ名の変更 /u01/app/oraInventory 宛先 oinstall.
スクリプトの実行が完了しました。
[root@host01 grid]#
[root@host01 grid]# /u01/app/19.3.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.3.0/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
Using configuration parameter file: /u01/app/19.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/host01/crsconfig/rootcrs_host02_2019-04-29_02-18-21AM.log
2019/04/29 02:18:44 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2019/04/29 02:18:44 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2019/04/29 02:18:44 CLSRSC-363: User ignored prerequisites during installation
2019/04/29 02:18:44 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2019/04/29 02:18:45 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2019/04/29 02:18:46 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2019/04/29 02:18:46 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2019/04/29 02:18:48 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2019/04/29 02:19:13 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2019/04/29 02:19:18 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2019/04/29 02:19:18 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2019/04/29 02:19:32 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2019/04/29 02:19:32 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2019/04/29 02:19:36 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2019/04/29 02:19:37 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2019/04/29 02:19:57 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2019/04/29 02:20:02 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2019/04/29 02:20:07 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2019/04/29 02:20:11 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.

ASMは正常に作成され、起動されました。

[DBT-30001] ディスク・グループは正常に作成されました。詳細は、/u01/app/grid/cfgtoollogs/asmca/asmca-190429午前022041.logを参照してください。

2019/04/29 02:21:39 CLSRSC-482: Running command: '/u01/app/19.3.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-4256: プロファイルを更新しています
投票ディスク726d6033fd944f09bf52a230bfac5fe1が正常に追加されました。
投票ディスク06789c1cb1bc4f36bf6609e3fbcf9f7aが正常に追加されました。
投票ディスクd26c39a0deed4ff2bf9c5bdcdae2171cが正常に追加されました。
投票ディスク・グループは+OCR01と正常に置換されました。
CRS-4256: プロファイルを更新しています
CRS-4266: 投票ファイルが正常に置換されました
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   726d6033fd944f09bf52a230bfac5fe1 (/dev/STORAGE01) [OCR01]
 2. ONLINE   06789c1cb1bc4f36bf6609e3fbcf9f7a (/dev/STORAGE02) [OCR01]
 3. ONLINE   d26c39a0deed4ff2bf9c5bdcdae2171c (/dev/STORAGE03) [OCR01]
3の投票ディスクを検出しました。
2019/04/29 02:23:00 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2019/04/29 02:24:07 CLSRSC-343: Successfully started Oracle Clusterware stack
2019/04/29 02:24:07 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2019/04/29 02:25:35 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.

[INFO] [DBT-30001] ディスク・グループは正常に作成されました。詳細は、/u01/app/grid/cfgtoollogs/asmca/asmca-190429午前022539.logを参照してください。


2019/04/29 02:26:20 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
```
成功みたい

```
[root@host01 grid]# /u01/app/19.3.0/grid/bin/crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
```

```
[root@host02 ~]# /u01/app/oraInventory/orainstRoot.sh
権限を変更中 /u01/app/oraInventory.
グループの読取り/書込み権限を追加中。
全ユーザーの読取り/書込み/実行権限を削除中。

グループ名の変更 /u01/app/oraInventory 宛先 oinstall.
スクリプトの実行が完了しました。
[root@host02 ~]# /u01/app/19.3.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.3.0/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
Using configuration parameter file: /u01/app/19.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/host02/crsconfig/rootcrs_host02_2019-04-29_02-27-29AM.log
2019/04/29 02:27:45 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2019/04/29 02:27:45 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2019/04/29 02:27:45 CLSRSC-363: User ignored prerequisites during installation
2019/04/29 02:27:45 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2019/04/29 02:27:47 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2019/04/29 02:27:47 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2019/04/29 02:27:47 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2019/04/29 02:27:49 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2019/04/29 02:27:50 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2019/04/29 02:27:50 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2019/04/29 02:27:58 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2019/04/29 02:27:58 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2019/04/29 02:28:00 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2019/04/29 02:28:00 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2019/04/29 02:28:12 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2019/04/29 02:28:19 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2019/04/29 02:28:21 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2019/04/29 02:28:22 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2019/04/29 02:28:23 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2019/04/29 02:28:32 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2019/04/29 02:29:21 CLSRSC-343: Successfully started Oracle Clusterware stack
2019/04/29 02:29:21 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2019/04/29 02:29:36 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2019/04/29 02:29:41 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
```
２ノード目はもう少し淡白

```:インストールは順調
[root@host01 grid]# /u01/app/19.3.0/grid/bin/crsctl check cluster -all
**************************************************************
host01:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
host02:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
[root@host01 grid]#
```
<img width="804" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/3d473324-493b-361a-152d-7af7ee7d5c70.png">
ここ長い・・・進まない。

MGMT、90Gの２多重だとサイズが不安だな

タイムアウトしたな、chrony停止してないとダメなようだ、こんなけ待たせておいて
あ、画面のキャプチャ消しちゃった・・・

```
[root@host01 grid]# systemctl status chronyd
● chronyd.service - NTP client/server
   Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
   Active: active (running) since 日 2019-04-28 14:23:27 JST; 13h ago
     Docs: man:chronyd(8)
           man:chrony.conf(5)
 Main PID: 5965 (chronyd)
    Tasks: 1
   CGroup: /system.slice/chronyd.service
           └─5965 /usr/sbin/chronyd

 4月 28 14:23:26 host01.co.jp systemd[1]: Starting NTP client/server...
 4月 28 14:23:27 host01.co.jp chronyd[5965]: chronyd version 3.2 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SECHASH +SIG... +DEBUG)
 4月 28 14:23:27 host01.co.jp chronyd[5965]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/drift
 4月 28 14:23:27 host01.co.jp systemd[1]: Started NTP client/server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@host01 grid]# systemctl stop chronyd
[root@host01 grid]# systemctl dissable chronyd
Unknown operation 'dissable'.
[root@host01 grid]# systemctl disable chronyd
Removed symlink /etc/systemd/system/multi-user.target.wants/chronyd.service.
[root@host01 grid]# systemctl status chronyd
● chronyd.service - NTP client/server
   Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:chronyd(8)
           man:chrony.conf(5)

 4月 28 14:23:26 host01.co.jp systemd[1]: Starting NTP client/server...
 4月 28 14:23:27 host01.co.jp chronyd[5965]: chronyd version 3.2 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SECHASH +SIG... +DEBUG)
 4月 28 14:23:27 host01.co.jp chronyd[5965]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/drift
 4月 28 14:23:27 host01.co.jp systemd[1]: Started NTP client/server.
 4月 29 03:43:03 host01.co.jp systemd[1]: Stopping NTP client/server...
 4月 29 03:43:03 host01.co.jp chronyd[5965]: chronyd exiting
 4月 29 03:43:03 host01.co.jp systemd[1]: Stopped NTP client/server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@host01 grid]#
[root@host01 grid]# mv /etc/chrony.conf /etc/chrony.conf.bk
```
<img width="800" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/141308/acc38205-0ab4-7520-8541-4e4818ff0d4a.png">

```
[root@host01 grid]# /u01/app/19.3.0/grid/bin/asmcmd lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512             512   4096  1048576     92160    44972            30720            7126              0             N  MGMT01/
MOUNTED  NORMAL  N         512             512   4096  1048576     30720    29971            10240            9865              0             Y  OCR01/
[root@host01 grid]#
[root@host01 grid]# /u01/app/19.3.0/grid/bin/asmcmd du MGMT01/_MGMTDB/
Used_MB      Mirror_used_MB
  23406               46858
[root@host01 grid]#
[root@host01 grid]# sudo -u grid /u01/app/19.3.0/grid/OPatch/opatch lspatches
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517247;ACFS RELEASE UPDATE 19.3.0.0.0 (29517247)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)
29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763)

OPatch succeeded.
[root@host01 grid]#

// OCRのバックアップもASMか
[root@host01 ~]# /u01/app/19.3.0/grid/bin/asmcmd ls -l MGMT01/cluster193/OCRBACKUP/
Type       Redund  Striped  Time             Sys  Name
OCRBACKUP  MIRROR  COARSE   APR 29 10:00:00  Y    backup00.ocr.285.1006857575
OCRBACKUP  MIRROR  COARSE   APR 29 06:00:00  Y    backup01.ocr.282.1006843165
OCRBACKUP  MIRROR  COARSE   APR 29 06:00:00  Y    day.ocr.283.1006843173
OCRBACKUP  MIRROR  COARSE   APR 29 06:00:00  Y    week.ocr.284.1006843175
[root@host01 ~]#
```

よし、消してレスポンスファイルでのサイレントモードだ