第7步:安裝Grid


7.1解壓文件
注意,安裝 Grid 時需要以 grid 用戶身份執行,在那之前需要以 root 身份執行 xhost+ ,即命令:
代碼 1
[root@sgdb1~]# xhost+
[root@sgdb1~]# su - grid
[grid@sgdb1~]$ unzip /tmp/p10404530_112030_Linux-x86-64_3of7.zip
解壓得到 /tmp/grid 文件夾

 

1   執行 xhost+
[grid@sgdb1~]$ cd /tmp/grid
[grid@sgdb1~]$ ./runInstaller

 

2   執行 runInstaller
7.2 跳過軟件更新
選擇【 Skip software updates 】,點擊【 Next

 

3   跳過軟件更新

7.3 Grid安裝選項

選擇【 Install and configure oracle grid infrastructure for a cluster 】,點擊【 Next

 

4  Grid 安裝選項

 

7.4 Grid安裝方式

選擇【 Advanced Installation 】,選擇高級安裝方式,點擊【 Next

 

5  Grid 安裝方式

 

7.5 Grid安裝語言

在左側選擇【 Simplified Chinese 】加入到右側中,點擊【 Next

 

6  Grid 安裝語言

 

7.6 設置SCAN IP

SCAN Name 中添加 scan-ip 對應的主機名,如不明確,可去 /etc/hosts 文件中查詢
取消【 Configure GNS
點擊【 Next

 

7   設置 SCAN Name

 

7.7 配置集群服務器SSH服務

默認情況下,一般只有 sgdb1 ,需要手動添加 sgdb2 sgdb2-vip (添加后要保證 SSH Connectivity 的正確性),點擊【 Add 】按鈕,添加節點

 

8   配置集群服務器 SSH 服務
輸入另外一個節點的相關主機名: sgdb2 sgdb2-vip ,點擊【 OK

 

9   配置集群服務器 SSH 服務
配置 SSH 屬性,點擊【 SSH Connectivity

 

10        配置集群服務器 SSH 服務
輸入 grid 用戶的密碼,點擊【 Setup 】按鈕,建立互信

 

11        配置集群服務器 SSH 服務
互信建立完畢,點擊【 OK 】,點擊【 Next

 

12        配置集群服務器 SSH 服務

 

7.8 設置網絡

確認網絡,包括私網網段與公網網段,確認無誤后,點擊【 Next

 

13        設置網絡

 

7.9 選擇存儲方式

選擇【 ASM 】方式,點擊【 Next

 

14        選擇存儲方式

 

7.10  選擇OCR+投票盤

輸入磁盤組名稱: BJ_SGDB_OCR
冗余方式【 Redundancy -  選擇【 Extenal 】(根據實際場景可選擇 High Normal
勾選投票盤 /dev/asm-ocr
點擊【 Next
注意: 如果使用 ASM 塊設備方式,路徑為 /dev ;如果使用裸設備方式,路徑為 /dev/raw/* ;如果找不到磁盤,點擊右下方的【 Change Discovery Path 】修改路徑。

 

15       選擇投票盤

 

7.11 設置ASM管理用戶密碼

(密碼一般為 oracle ),點擊【 Next

 

16        設置 ASM 管理用戶密碼
點擊【 Yes

 

17        設置 ASM 管理用戶密碼

 

7.12 設置IPM

勾選【 Do not use intelligent platform management interface(IPMI) 】(默認)
點擊【 Next

 

18        設置 IPMI

 

7.13 設置ASM管理用戶與用戶組

DBA                     選擇 asmdba
Operator               選擇 asmoper
Adminstrator  選擇 asmadmin

 

19       ASM 管理用戶與組

 

7.14 設置Grid軟件安裝路徑

一般由 Grid 用戶的環境變量設置,默認即可。點擊【 Next

 

20       設置Grid軟件安裝路徑

 

7.15 設置oraInventory路徑

(默認即可),點擊【 Next

 

21       設置oraInventory路徑

 

7.16 執行安裝前檢查

有若干錯誤,沒有關系,可以通過點擊【 Fix & Check Again 】來解決

 

22        執行安裝前檢查
此時將有對話框彈出,以 root 身份運行 /tmp/CVU_11.2.0.4_grid/runfixup.sh ,( sgdb1 sgdb2 兩台都需要執行)

 

23        執行自動 fix 腳本
代碼 22
[root@sgdb1 CVU_11.2.0.4.0_grid]# ./runfixup.sh
Response file being used is :./fixup.response
Enable file being used is :./fixup.enable
Log file location: ./orarun.log
Installing Package /tmp/CVU_11.2.0.4.0_grid//cvuqdisk-1.0.9-1.rpm
Preparing...                ########################################### [100%]
1:cvuqdisk               ########################################### [100%]
 
代碼 23
[root@sgdb2 CVU_11.2.0.4.0_grid]# ./runfixup.sh
Response file being used is :./fixup.response
Enable file being used is :./fixup.enable
Log file location: ./orarun.log
Installing Package /tmp/CVU_11.2.0.4.0_grid//cvuqdisk-1.0.9-1.rpm
Preparing...                ########################################### [100%]
1:cvuqdisk               ########################################### [100%]
執行完成后,點擊【 OK
確認無特殊問題,點擊【 Ignore All
點擊【 Next

 

24        再次執行檢查
點擊【 Yes

 

25        確認忽略問題

 

7.17 安裝信息統計

點擊【 Install 】,開始安裝

 

26       安裝前信息匯總

 

7.18 安裝過程

 

27       安裝過程

 

7.19 安裝結束前,需要執行腳本

安裝到最后階段,需要以 root 身份執行這兩個腳本,注意 順序一定不能錯
執行順序為
SGDB1 節點執行 orainstRoot.sh
SGDB2 節點執行 orainstRoot.sh
SGDB1 節點執行 root.sh
SGDB2 節點執行 root.sh

 

28        安裝過程中執行腳本
在執行之前,需要查看 /oracle 目錄下的所有目錄的屬主和權限,如果權限不正確,下面步驟將執行錯誤
步驟一: SGDB1 節點執行 orainstRoot.sh
代碼 24
[root@sgdb1 ~]# /oracle/oraInventory/orainstRoot.sh
Changing permissions of /oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /oracle/oraInventory to oinstall.
The execution of the script is complete.
步驟二: SGDB2 節點執行 orainstRoot.sh
代碼 25
[root@sgdb2 ~]# /oracle/oraInventory/orainstRoot.sh
Changing permissions of /oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /oracle/oraInventory to oinstall.
The execution of the script is complete.
3 )步驟三:    SGDB1 節點執行 root.sh
代碼 26
[root@sgdb1 ~]# /oracle/crs/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME=  /oracle/crs
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.
Using configuration parameter file: /oracle/crs/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - 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 Clusterware entries to upstart
CRS-2672: Attempting to start 'ora.mdnsd' on 'sgdb1'
CRS-2676: Start of 'ora.mdnsd' on 'sgdb1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'sgdb1'
CRS-2676: Start of 'ora.gpnpd' on 'sgdb1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'sgdb1'
CRS-2672: Attempting to start 'ora.gipcd' on 'sgdb1'
CRS-2676: Start of 'ora.cssdmonitor' on 'sgdb1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'sgdb1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'sgdb1'
CRS-2672: Attempting to start 'ora.diskmon' on 'sgdb1'
CRS-2676: Start of 'ora.diskmon' on 'sgdb1' succeeded
CRS-2676: Start of 'ora.cssd' on 'sgdb1' succeeded
ASM created and started successfully.
Disk Group BJ_SGDB_DATA created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 3766451fc40a4fb4bf5638920562eefe.
Successfully replaced voting disk group with +BJ_SGDB_DATA.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
1. ONLINE   3766451fc40a4fb4bf5638920562eefe (/dev/asm-data1) [BJ_SGDB_DATA]
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.BJ_SGDB_DATA.dg' on 'sgdb1'
CRS-2676: Start of 'ora.BJ_SGDB_DATA.dg' on 'sgdb1' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
步驟四: SGDB2 節點執行 root.sh
代碼 27
[root@sgdb2 ~]# /oracle/crs/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME=  /oracle/crs
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.
Using configuration parameter file: /oracle/crs/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer OLR initialization - successful
Adding Clusterware entries to upstart
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node sgdb1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
 
意外情況:
代碼 28
執行/oracle/crs/root.sh報出:
Failed to create keys in the olr 錯誤
問題原因是缺少包導致的,在節點上安裝 compat-libcap
[root@sgdb2 # yum -y install compat-libcap*
執行以下命令,清空當前 CRS 的配置
[root@sgdb2 #perl /oracle/crs/crs/install/rootcrs.pl -verbose -deconfig -force
再次執行 /oracle/crs/root.sh
 

 

7.20 Grid繼續安裝

如果上一步全部成功,則可以點擊【 OK 】,繼續完成安裝

 

29        點擊 OK 繼續安裝

 

30       繼續安裝

 

7.21 Grid完成安裝

安裝到 100% 的時候,會報錯,直接點擊【 OK 】即可:

 

31        報錯信息

 

7.22 Grid安裝完畢,有一項錯誤

錯誤為【 Oracle Cluster Verification Utility Failed 】,不影響集群的使用,點擊【 Close

 

32        安裝完畢


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM