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
文件夹
![](https://i-blog.csdnimg.cn/blog_migrate/61a806817a352e0b0ccc1f8f435a3ba7.png)
图
1
执行
xhost+
[grid@sgdb1~]$ cd /tmp/grid
[grid@sgdb1~]$ ./runInstaller
|
![](https://i-blog.csdnimg.cn/blog_migrate/f49c66a9c975f6b00038c786171d240c.png)
图
2
执行
runInstaller
7.2 跳过软件更新
选择【
Skip software updates
】,点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/304d42f7ddfcf6dcdd616f2ba45151c9.png)
图
3
跳过软件更新
7.3 Grid安装选项
选择【
Install and configure oracle grid infrastructure for a cluster
】,点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/e94734e189d81f00d3edfc0ce891a722.png)
图
4 Grid
安装选项
7.4 Grid安装方式
选择【
Advanced Installation
】,选择高级安装方式,点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/bb73566297a25ca7c9022f80774e3e70.png)
图
5 Grid
安装方式
7.5 Grid安装语言
在左侧选择【
Simplified Chinese
】加入到右侧中,点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/25e05fe910b61f871b767bd502a8cd12.png)
图
6 Grid
安装语言
7.6 设置SCAN IP
在
SCAN Name
中添加
scan-ip
对应的主机名,如不明确,可去
/etc/hosts
文件中查询
取消【
Configure GNS
】
点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/edb1afd65c14cb87c3e13b440f5c4cb0.png)
图
7
设置
SCAN Name
7.7 配置集群服务器SSH服务
默认情况下,一般只有
sgdb1
,需要手动添加
sgdb2
与
sgdb2-vip
(添加后要保证
SSH Connectivity
的正确性),点击【
Add
】按钮,添加节点
![](https://i-blog.csdnimg.cn/blog_migrate/5bb3fedf569959b83404a31e392d12ab.png)
图
8
配置集群服务器
SSH
服务
输入另外一个节点的相关主机名:
sgdb2
、
sgdb2-vip
,点击【
OK
】
![](https://i-blog.csdnimg.cn/blog_migrate/a9139af29bb491a427c182576ac73b1c.png)
图
9
配置集群服务器
SSH
服务
配置
SSH
属性,点击【
SSH Connectivity
】
![](https://i-blog.csdnimg.cn/blog_migrate/d3c2af6b774014092e7156404ee79a46.png)
图
10
配置集群服务器
SSH
服务
输入
grid
用户的密码,点击【
Setup
】按钮,建立互信
![](https://i-blog.csdnimg.cn/blog_migrate/ebe532681eaad3bcddb3758419465f1c.png)
图
11
配置集群服务器
SSH
服务
互信建立完毕,点击【
OK
】,点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/2ae4910b5a06bb71dad44d3194e3a6b9.png)
图
12
配置集群服务器
SSH
服务
7.8 设置网络
确认网络,包括私网网段与公网网段,确认无误后,点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/305b247d65c47eb4077c5146c3c0c7f7.png)
图
13
设置网络
7.9 选择存储方式
选择【
ASM
】方式,点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/0bea40fd788396ffa166a7440cb071e0.png)
图
14
选择存储方式
7.10 选择OCR+投票盘
输入磁盘组名称:
BJ_SGDB_OCR
;
冗余方式【
Redundancy
】
-
选择【
Extenal
】(根据实际场景可选择
High
、
Normal
)
勾选投票盘
/dev/asm-ocr
,
点击【
Next
】
注意:
如果使用
ASM
块设备方式,路径为
/dev
;如果使用裸设备方式,路径为
/dev/raw/*
;如果找不到磁盘,点击右下方的【
Change Discovery Path
】修改路径。
![](https://i-blog.csdnimg.cn/blog_migrate/962d06c80c1340df3e9631ac2b678263.png)
图15 选择投票盘
7.11 设置ASM管理用户密码
(密码一般为
oracle
),点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/ec348cef05c61fea0871f5965827f27a.png)
图
16
设置
ASM
管理用户密码
点击【
Yes
】
![](https://i-blog.csdnimg.cn/blog_migrate/8dae2105d7a36eff3277c2bd5b665833.png)
图
17
设置
ASM
管理用户密码
7.12 设置IPM
勾选【
Do not use intelligent platform management interface(IPMI)
】(默认)
点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/a032e093a0c88926f8e13e865e723f44.png)
图
18
设置
IPMI
7.13 设置ASM管理用户与用户组
DBA
选择
asmdba
组
Operator
选择
asmoper
组
Adminstrator
选择
asmadmin
组
![](https://i-blog.csdnimg.cn/blog_migrate/e308f809bc8f3de4d6540a38c79b0f82.png)
图
19 ASM
管理用户与组
7.14 设置Grid软件安装路径
一般由
Grid
用户的环境变量设置,默认即可。点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/fee5ffa5767280bdc08eb17bd67d8952.png)
图20 设置Grid软件安装路径
7.15 设置oraInventory路径
(默认即可),点击【
Next
】
![](https://i-blog.csdnimg.cn/blog_migrate/574918a8374d77fefe2af18ce0538057.png)
图21 设置oraInventory路径
7.16 执行安装前检查
有若干错误,没有关系,可以通过点击【
Fix & Check Again
】来解决
![](https://i-blog.csdnimg.cn/blog_migrate/81393cbf77d0b102e73d3fafaf7490b5.png)
图
22
执行安装前检查
此时将有对话框弹出,以
root
身份运行
/tmp/CVU_11.2.0.4_grid/runfixup.sh
,(
sgdb1
与
sgdb2
两台都需要执行)
![](https://i-blog.csdnimg.cn/blog_migrate/72694db9b36ca01bd527dfa38b6440b2.png)
图
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
】
![](https://i-blog.csdnimg.cn/blog_migrate/04563dd7251004cc53b658b4ad9481b4.png)
图
24
再次执行检查
点击【
Yes
】
![](https://i-blog.csdnimg.cn/blog_migrate/08b5b74a516181b7d7a48c555b52edee.png)
图
25
确认忽略问题
7.17 安装信息统计
点击【
Install
】,开始安装
![](https://i-blog.csdnimg.cn/blog_migrate/ee720c406355241394150cfef5dcc4ca.png)
图26 安装前信息汇总
7.18 安装过程
![](https://i-blog.csdnimg.cn/blog_migrate/8b7d8e63d5a00095a607b362cd485d73.png)
图27 安装过程
7.19 安装结束前,需要执行脚本
安装到最后阶段,需要以
root
身份执行这两个脚本,注意
顺序一定不能错
:
执行顺序为
SGDB1
节点执行
orainstRoot.sh
SGDB2
节点执行
orainstRoot.sh
SGDB1
节点执行
root.sh
SGDB2
节点执行
root.sh
![](https://i-blog.csdnimg.cn/blog_migrate/27fc14f7ca14077cc2f1409d4e362221.png)
图
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
】,继续完成安装
![](https://i-blog.csdnimg.cn/blog_migrate/4389cb9eaa8c2052ef1671215e9c89d7.png)
图
29
点击
OK
继续安装
![](https://i-blog.csdnimg.cn/blog_migrate/7bde32a653b3a4f60e4830567f733945.png)
图30 继续安装
7.21 Grid完成安装
安装到
100%
的时候,会报错,直接点击【
OK
】即可:
![](https://i-blog.csdnimg.cn/blog_migrate/36468d8a3bbb0337bc9355a72331ff6a.png)
图
31
报错信息
7.22 Grid安装完毕,有一项错误
错误为【
Oracle Cluster Verification Utility Failed
】,不影响集群的使用,点击【
Close
】
![](https://i-blog.csdnimg.cn/blog_migrate/8db21730ba5f424882a5a08187d8d12d.png)
图
32
安装完毕