第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安裝選項css

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

 

4  Grid 安裝選項

 

7.4 Grid安裝方式node

選擇【 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服務oracle

默認狀況下,通常只有 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 設置網絡ui

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

 

13        設置網絡

 

7.9 選擇存儲方式spa

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

 

14        選擇存儲方式

 

7.10  選擇OCR+投票盤3d

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

 

15       選擇投票盤rest

 

7.11 設置ASM管理用戶密碼orm

(密碼通常爲 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        安裝完畢
相關文章
相關標籤/搜索