CentOS 7.2安装11g Grid Infrastructure
vim /etc/hosts
cat /etc/hosts
#public ip
192.168.56.11 rac1 rac1-pub
192.168.56.12 rac2 rac2-pub
#private ip
10.10.10.11 rac1-priv
10.10.10.12 rac2-priv
#virtual ip
192.168.56.13 rac1-vip
192.168.56.14 rac2-vip
#scan ip
192.168.56.15 rac-scan
2. Disable firewall & selinux(all nodes).
systemctl stop firewalld
systemctl status firewalld
systemctl status firewalld
vim /etc/selinux/config
cat /etc/selinux/config
SELINUX=disabled
sestatus -v
SELinux status: disabled
3. Install packages(all nodes).
yum -y install binutils compat-db compat-libcap1 compat-libstdc++- control-center elfutils-libelf-devel gcc gcc-c++ glibc glibc-common gnome-libs libaio-devel libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21 smartmontools
4. Configure ssh connectivities(all nodes,both grid & oracle).
rac1:
ssh-keygen -t rsa
rac2:
ssh-keygen -t rsa
rac1:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
rac2:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh rac1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys //Test execute command on remote host without password.
ssh rac1 date
ssh rac2 date
5. Add user & usergroups(all nodes).
groupadd oinstall
groupadd dba
groupadd oper
groupadd asmdba
groupadd asmoper
groupadd asmadmin
useradd -g oinstall -G dba,oper,asmdba oracle
useradd -g oinstall -G asmdba,dba,asmadmin,asmoper grid
6. Create directory & grant privileges(all nodes).
mkdir /u01
mkdir /u01/gridbase
mkdir /u01/gridhome
mkdir /u01/oracle
chown -R grid:oinstall /u01
chown -R oracle:oinstall /u01/oracle
chmod -R g+w /u01
7. Modify environment variables((all nodes,both grid & oracle).
grid(rac1):
vim /home/grid/.bash_profile
cat /home/grid/.bash_profile
ORACLE_BASE = /u01/gridbase
ORACLE_HOME = /u01/gridhome
ORACLE_SID = +ASM1
PATH = $ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH = $ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH grid(rac2):
vim /home/grid/.bash_profile
cat /home/grid/.bash_profile
ORACLE_BASE = /u01/gridbase
ORACLE_HOME = /u01/gridhome
ORACLE_SID = +ASM2
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH = $ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH oracle(rac1):
vim /home/oracle/.bash_profile
cat /home/oracle/.bash_profile
ORACLE_BASE = /u01/oracle
ORACLE_HOME = /u01/oracle/db
ORACLE_SID = ora11g1
PATH = $ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH = $ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH oracle(rac2):
vim /home/oracle/.bash_profile
cat /home/oracle/.bash_profile
ORACLE_BASE = /u01/oracle
ORACLE_HOME = /u01/oracle/db
ORACLE_SID = ora11g2
PATH = $ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH = $ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH //Make it take effect(rac1 & rac2).
source /home/oracle/.bash_profile
source /home/grid/.bash_profile
8. Modify kernel parameters(all nodes).
vim /etc/sysctl.conf
cat vim /etc/sysctl.conf
kernel.msgmnb =
kernel.msgmax =
kernel.shmmax = //1G memory for Oracle.
kernel.shmall =
kernel.shmmni =
fs.aio-max-nr =
fs.file-max =
kernel.sem =
net.ipv4.ip_local_port_range =
net.core.rmem_default =
net.core.rmem_max =
net.core.wmem_default =
net.core.wmem_max = //Make the kernel parameters take effect.
sysctl -p
9. Modify limites(all nodes).
vim /etc/security/limits.conf
cat /etc/security/limits.conf
#oracle
oracle soft nproc
oracle hard nproc
oracle soft nofile
oracle hard nofile
oracle soft stack
#grid
grid soft nproc
grid hard nproc
grid soft nofile
grid hard nofile
grid soft stack
10. Modify pam limits(all nodes).
vim /etc/pam.d/login
cat /etc/pam.d/login
session required /lib64/security/pam_limits.so
session required pam_limits.so
11. Modify profile(all nodes).
vim /etc/profile
cat /etc/profile
if [ $USER = "oracle" ]||[$USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p ulimit -n else
/
ulimit -u -n
fi
fi
fdisk -l
fdisk /dev/sdc
n
enter
enter
enter
w fdisk /dev/sdd
n
enter
enter
enter
w fdisk /dev/sde
n
enter
enter
enter
w ll /dev/sd*
...
/dev/sdc1
/dev/sdd1
/dev/sde1
2. Install asmlib packages(both rac1 & rac2).
yum -y localinstall kmod-oracleasm oracleasm-support oracleasmlib
3. Bind the shared disks with "oracleasm"(root execute).
rac1:
oracleasm configure -i
grid
asmadmin
y
y oracleasm init oracleasm createdisk ASMDISK1 sdc1
oracleasm createdisk ASMDISK2 sdd1
oracleasm createdisk ASMDISK3 sde1 oracleasm listdisks
ASMDISK1
ASMDISK2
ASMDISK3 oracleasm scandisks rac2:
oracleasm configure -i
grid
asmadmin
y
y oracleasm init //Reboot rac2 and check the shared disks.
oracleasm listdisks
ASMDISK1
ASMDISK2
ASMDISK3
cd /u01
unzip p13390677_112040_Linux-x86-64_3of7.zip
chown -R grid:oinstall /u01/grid
cd /u01/grid
./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -fixup -verbose
yum -y groupinstall "X Windows System"
xhost +
export DISPLAY=192.168.56.99:0.0
./runInstaller -ignorePrereq //I've tried many times not add "-ignorePrereq" option,but the OUI will stuck at 61% when checking the semaphore.I'm afraid it's the incompatible poit installing 11g rac on CentOS 7.2.The picture of stuck point shows below.





6. Execute below scripts in RAC1,RAC2 in order(This step really took me quit a long time to solve it,So I'd like to put the details below).
/u01/oraInventory/orainstRoot.sh
/u01/gridhome/root.sh I got an error bellow when execute "/u01/gridhome/root.sh" script: Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last lines of the alert log follow:
-- ::20.078:
[client()]CRS-:The OLR was formatted using version .
-- ::24.742:
[client()]CRS-:The OLR was formatted using version .
-- ::25.615:
[client()]CRS-:The OLR was formatted using version . //It's an oracle bug 18370031,a patch should be applied before execute the "root.sh". su - root
chown -R grid:oinstall /u01/
su - grid
export PATH=$PATH:$ORACLE_HOME/OPatch
mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch112034
cd /u01
unzip p6880880_112000_Linux-x86-.zip -d $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch version
OPatch Version: 11.2.0.3. OPatch succeeded. cd ~
$ORACLE_HOME/OPatch/ocm/bin/emocmrsp
OCM Installation Response Generator 10.3.7.0. - Production
Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
The OCM configuration response file (ocm.rsp) was successfully created. unzip p18370031_112040_Linux-x86-.zip
opatch apply /u01// -oh $ORACLE_HOME -ocmrf /home/grid/ocm.rsp
Oracle Interim Patch Installer version 11.2.0.3.
Copyright (c) , Oracle Corporation. All rights reserved. Oracle Home : /u01/gridhome
Central Inventory : /u01/oraInventory
from : /u01/gridhome/oraInst.loc
OPatch version : 11.2.0.3.
OUI version : 11.2.0.4.
Log file location : /u01/gridhome/cfgtoollogs/opatch/opatch2018--27_06--31AM_1.log Verifying environment and performing prerequisite checks...
OPatch continues with these patches: Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/gridhome') Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '' to OH '/u01/gridhome' Patching component oracle.crs, 11.2.0.4.... Copy failed from '/u01/18370031/files/bin/ohasd.bin' to '/u01/gridhome/bin/ohasd.bin'...
Please verify all applications associated with the Oracle Home '/u01/gridhome' are shut down. If this is AIX, please perform solution documented in Note 739963.1 on https://myoraclesupport.oracle.com. Do you want to retry copying the file? [y|n]
y
User Responded with: Y Retry copying the file to '/u01/gridhome/bin/ohasd.bin'. The following actions have failed:
Copy failed from '/u01/18370031/files/bin/ohasd.bin' to '/u01/gridhome/bin/ohasd.bin'... Do you want to proceed? [y|n]
Y
User Responded with: Y
Patch successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/gridhome/cfgtoollogs/opatch/opatch2018--27_06--31AM_1.log OPatch completed with warnings.
[grid@rac2 u01]$ ps -ef|grep ohasd
root : ? :: /u01/gridhome/bin/ohasd.bin reboot
grid : pts/ :: grep --color=auto ohasd //If you want to copy it right now,then kill the ohasd process first(I didn't do that). kill -
cp /u01//ohasd.bin /u01/gridhome/bin/ohasd.bin //If you are using OEL 7.2,there's another patch "19404309" need to apply to guarantee the GRID Softerware can be normally implement. [root@rac1 ~]# /u01/gridhome/root.sh
Performing root user operation for Oracle 11g The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/gridhome Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite. 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: /u01/gridhome/crs/install/crsconfig_params
User ignored Prerequisites during installation
Installing Trace File Analyzer
Adding Clusterware entries to oracle-ohasd.service
CRS-: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-: Attempting to start 'ora.gipcd' on 'rac1'
CRS-: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-: Attempting to start 'ora.cssd' on 'rac1'
CRS-: Attempting to start 'ora.diskmon' on 'rac1'
CRS-: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-: Start of 'ora.cssd' on 'rac1' succeeded ASM created and started successfully. Disk Group OCRVOTE created successfully. clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-: Updating the profile
Successful addition of voting disk a11c41b9357d4f48bf1b7c5e03c1510a.
Successfully replaced voting disk group with +OCRVOTE.
CRS-: Updating the profile
CRS-: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
. ONLINE a11c41b9357d4f48bf1b7c5e03c1510a (ORCL:ASMDISK1) [OCRVOTE]
Located voting disk(s).
sh: /bin/netstat: No such file or directory
CRS-: Attempting to start 'ora.asm' on 'rac1'
CRS-: Start of 'ora.asm' on 'rac1' succeeded
CRS-: Attempting to start 'ora.OCRVOTE.dg' on 'rac1'
CRS-: Start of 'ora.OCRVOTE.dg' on 'rac1' succeeded
Preparing packages...
ls: cannot access /usr/sbin/smartctl: No such file or directory
/usr/sbin/smartctl not found.
error: %pre(cvuqdisk-1.0.-.x86_64) scriptlet failed, exit status
error: cvuqdisk-1.0.-.x86_64: install failed
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@rac1 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....N1.lsnr ora....er.type ONLINE ONLINE rac1
ora.OCRVOTE.dg ora....up.type ONLINE ONLINE rac1
ora.asm ora.asm.type ONLINE ONLINE rac1
ora.cvu ora.cvu.type ONLINE ONLINE rac1
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type ONLINE ONLINE rac1
ora.ons ora.ons.type ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora.rac1.gsd application OFFLINE OFFLINE
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type ONLINE ONLINE rac1 //Omitted the procedure of apply patch "18370031" on RAC2. [root@rac2 ~]# /u01/gridhome/root.sh
Performing root user operation for Oracle 11g The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/gridhome Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite. 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: /u01/gridhome/crs/install/crsconfig_params
User ignored Prerequisites during installation
Installing Trace File Analyzer
CRS-: Attempting to start 'ora.mdnsd' on 'rac2'
CRS-: Start of 'ora.mdnsd' on 'rac2' succeeded
CRS-: Attempting to start 'ora.gpnpd' on 'rac2'
CRS-: Start of 'ora.gpnpd' on 'rac2' succeeded
CRS-: Attempting to start 'ora.cssdmonitor' on 'rac2'
CRS-: Attempting to start 'ora.gipcd' on 'rac2'
CRS-: Start of 'ora.cssdmonitor' on 'rac2' succeeded
CRS-: Start of 'ora.gipcd' on 'rac2' succeeded
CRS-: Attempting to start 'ora.cssd' on 'rac2'
CRS-: Attempting to start 'ora.diskmon' on 'rac2'
CRS-: Start of 'ora.diskmon' on 'rac2' succeeded
CRS-: Start of 'ora.cssd' on 'rac2' succeeded
sh: /bin/netstat: No such file or directory
Preparing packages...
ls: cannot access /usr/sbin/smartctl: No such file or directory
/usr/sbin/smartctl not found.
error: %pre(cvuqdisk-1.0.-.x86_64) scriptlet failed, exit status
error: cvuqdisk-1.0.-.x86_64: install failed
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@rac2 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....N1.lsnr ora....er.type ONLINE ONLINE rac1
ora.OCRVOTE.dg ora....up.type ONLINE ONLINE rac1
ora.asm ora.asm.type ONLINE ONLINE rac1
ora.cvu ora.cvu.type ONLINE ONLINE rac1
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type ONLINE ONLINE rac1
ora.ons ora.ons.type ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora.rac1.gsd application OFFLINE OFFLINE
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora.rac2.gsd application OFFLINE OFFLINE
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
ora.scan1.vip ora....ip.type ONLINE ONLINE rac1
7. Skip the subsequent failure of checking NETCA & CVU and finish the installation of GI and check crs status.
[root@rac1 u01]# crsctl check crs
CRS-: Oracle High Availability Services is online
CRS-: Cluster Ready Services is online
CRS-: Cluster Synchronization Services is online
CRS-: Event Manager is online
[root@rac2 u01]# crsctl check crs
CRS-: Oracle High Availability Services is online
CRS-: Cluster Ready Services is online
CRS-: Cluster Synchronization Services is online
CRS-: Event Manager is online
CentOS 7.2安装11g Grid Infrastructure的更多相关文章
- RAC2——11g Grid Infrastructure的新机制
版权声明:本文为博主原创文章,未经博主允许不得转载. 可以看到,最初CRS(Cluster Ready Services)名词的起源就是因为10.1中作为集群软件的原因.后来经历了Clusterwar ...
- Linux安装Oracle 11g Grid Infrastructure 出现OUI-10182错误解决办法
已确保安装的ORACLE_BASE目录是属于grid:oinstall 但安装时总是报:OUI-10182 The effective user ID does not match the own ...
- CentOS 7.2安装11g数据库软件
Preface Yesterday I've installed the 11g GI software on CentOS 7.2.But I still encounter som ...
- Oracle Grid Infrastructure安装部署文档
1. 部署环境步骤 1.1 软件环境 操作系统: CentOS release 6.5 oracle安装包: linux.x64_11gR2_grid.zip linux.x64_11gR2_data ...
- 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:4.安装Oracle RAC FAQ-4.6.重新配置与缷载11R2 Grid Infrastructure
1.[root@linuxrac1 ~]# /u01/app/oraInventory/orainstRoot.sh 2.[root@linuxrac2 ~]# /u01/app/oraInvento ...
- 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:4.安装Oracle RAC FAQ-4.4.无法图形化安装Grid Infrastructure
无法图形化安装: [grid@linuxrac1 grid]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp ...
- 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:3.安装Oracle RAC-3.4.安装Grid Infrastructure
3.4.安装Grid Infrastructure 3.4.1.安装Grid 1.运行 grid的安装文件runInstaller [grid@linuxrac1 grid]$ ./runInstal ...
- Centos 6.5 安装Oracle 11g R2 on vbox
由于上一篇的rac安装,截图较多,这一篇选择以txt的方式叙述,另外上一篇的时间比较久远,这里最近从新安装 --2018-10-29 1 os环境初始化 [root@rac1 yum.repos.d] ...
- Linux下搭建Oracle11g RAC(6)----安装Grid Infrastructure
从此步骤开始,我们正式安装Grid软件: ① 以grid用户登录图形界面,执行/home/grid/grid/runInstaller,进入OUI的图形安装界面: ② 进入OUI安装界面后,选择第3项 ...
随机推荐
- tp3.2中的 I () 方法
I('get.id'); // 相当于 $_GET['id']
- Kali-linux攻击WordPress和其他应用程序
今天越来越多的企业利用SAAS(Software as a Service)工具应用在他们的业务中.例如,他们经常使用WordPress作为他们网站的内容管理系统,或者在局域网中使用Drupal框架. ...
- 一张图解释 implicit
- 简要的谈一谈我对CSS中长度单位的理解
CSS中的长度单位目前分为两种,分别是绝对长度和相对长度.绝对长度单位包括: in:英寸 cm:厘米 mm:毫米 pt:磅(1磅等于1/72英寸) pc:pica(1pica等于12磅) 以上五个就是 ...
- ConcurrentHashMap 中putIfAbsent 和put的区别
putIfAbsent 源代码 public V putIfAbsent(K key, V value) { Segment<K,V> s; if (value == null) thro ...
- Faster Alternatives to glReadPixels and glTexImage2D in OpenGL ES
In the development of Shou, I’ve been using GLSL with NEON to manipulate image rotation, scaling and ...
- 【Linux学习笔记】Linux-CentOS下安装Redis
虚机装了个Linux,尝试安装了一下Redis这款NoSQL数据库玩玩,作为Linux小白,我安装的是有可视化桌面的CentOS,所以不是纯命令行操作,怎么方便怎么来嘛~ 1.官网下载Redis到指定 ...
- 微信小程序开发——进阶篇
由于项目的原因,最近的工作一直围绕着微信小程序.现在也算告一段落,是时候整理一下这段时间的收获了.我维护的小程序有两个,分别是官方小程序和一个游戏为主的小程序.两个都是用了wepy进行开发,就是这个: ...
- 如何在github上实现预览
这个问题在网络上有很多答案,但是真正能解决的寥寥无几!接下来我就来尝试一下网络上疯传的几种方法.准备好了吗?我要开车了!!! PS:以下实验上传到github的demo采取导入本地css,js和网络上 ...
- java中exception和error有什么区别,运行时异常和一般异常有什么区别
1.exception和error都是继承了throwable类,在java中只有throwable类型的实例才可以被抛出(throw)或者捕获(catch),它是异常处理机制的基本组成类型 2.ex ...