RHEL 7.X 或CentOS 7 安装 11.2.0.4 RAC碰到的问题


RHEL 7.X 或CentOS 7 安装 11.2.0.4 RAC碰到的问题


随着Linux 7 版本的普及,但Oracle数据库主流版本仍是11gR2,11.2.0.4 是生产安装首选。由于11.2.0.4对Linux 7 的支持不很完美,在Linux 7 上安装会遇到几处问题,以此记录下来。

https://docs.oracle.com/cd/E11882_01/relnotes.112/e23558/toc.htm#CJAJEBGG

 

1.安装GI执行root.sh脚本时,ohasd 进程无法正常启动

ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow: 
2018-04-19 09:54:30.897: 
[client(19244)]CRS-2101:The OLR was formatted using version 3.

alert:

Oracle High Availability Service has timed out waiting for init.ohasd to be started.

 

  因为Oracle Linux 7(和Redhat 7)使用systemd而不是initd来启动/重新启动进程,并将它们作为服务运行,所以当前的11.2.0.4和12.1.0.1的软件安装不会成功,因为ohasd进程没有正常启动。

解决方法一:

在root.sh执行之前先打上补丁:18370031。

 

解决方法二:手动在systemd中添加ohasd服务

(1).创建一个空服务文件:/usr/lib/systemd/system/ohasd.service

touch /usr/lib/systemd/system/ohasd.service

 

(2).编辑文件ohasd.service添加如下内容

vi   /usr/lib/systemd/system/ohasd.service

[Unit]
Description=Oracle High Availability Services
After=syslog.target

[Service]
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Restart=always

[Install]
WantedBy=multi-user.target

 

(3).添加和启动服务

systemctl daemon-reload
systemctl enable ohasd.service
systemctl start ohasd.service

查看运行状态:

[root@rac1 system]# systemctl status ohasd.service
● ohasd.service - Oracle High Availability Services
Loaded: loaded (/usr/lib/systemd/system/ohasd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2018-04-19 14:10:19 CST; 1h 16min ago
Main PID: 1210 (init.ohasd)
CGroup: /system.slice/ohasd.service
└─1210 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple

Apr 19 14:10:19 bms-75c8 systemd[1]: Started Oracle High Availability Services.
Apr 19 14:10:19 bms-75c8 systemd[1]: Starting Oracle High Availability Services...

 

(4).重新执行root.sh脚本

注意: 为了避免其余节点遇到这种报错,可以在root.sh执行过程中,待/etc/init.d/目录下生成了init.ohasd 文件后执行systemctl start ohasd.service 启动ohasd服务即可。若没有/etc/init.d/init.ohasd文件 systemctl start ohasd.service 则会启动失败。

 

2.安装database软件,在执行root.sh脚本的时候会报错:


Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk'
解决方法一: 
选择 继续,然后打上补丁:19692824 
解决方法二:
编辑文件 $ORACLE_HOME/sysman/lib/ins_emagent.mk

vi /u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk

找到 $(MK_EMAGENT_NMECTL) 这一行,在后面添加 -lnnz11 如下:

$(MK_EMAGENT_NMECTL) -lnnz11
然后点击retry 即可




报错信息



[root@rac1 ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -verbose -force
Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perlusr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /u01/app/11.2.0/grid/crs/install) at /u01/app/11.2.0/gd/crs/install/crsconfig_lib.pm line 703.
BEGIN failed--compilation aborted at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 703.
Compilation failed in require at /u01/app/11.2.0/grid/crs/install/rootcrs.pl line 305.
BEGIN failed--compilation aborted at /u01/app/11.2.0/grid/crs/install/rootcrs.pl line 305.

解决方法

根据提示信息Can't locate Env.pm 可以知道找不到这玩意了。所以cp一份过去



[root@rac2 ~]#cp -p /u01/app/11.2.0/grid/perl/lib/5.10.0/Env.pm /usr/lib64/perl5/vendor_perl/

就OK了!记录一下




About Me

........................................................................................................................

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文在itpub( http://blog.itpub.net/26736162 )、博客园( http://www.cnblogs.com/lhrbest )和个人weixin公众号( xiaomaimiaolhr )上有同步更新

● 本文itpub地址: http://blog.itpub.net/26736162

● 本文博客园地址: http://www.cnblogs.com/lhrbest

● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/

● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/

● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

........................................................................................................................

● QQ群号: 230161599 (满) 、618766405

● weixin群:可加我weixin,我拉大家进群,非诚勿扰

● 联系我请加QQ好友 646634621 ,注明添加缘由

● 于 2018-09-01 06:00 ~ 2018-09-31 24:00 在魔都完成

● 最新修改时间:2018-09-01 06:00 ~ 2018-09-31 24:00

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

........................................................................................................................

小麦苗的微店 https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

小麦苗出版的数据库类丛书 http://blog.itpub.net/26736162/viewspace-2142121/

小麦苗OCP、OCM、高可用网络班 http://blog.itpub.net/26736162/viewspace-2148098/

小麦苗腾讯课堂主页 https://lhr.ke.qq.com/

........................................................................................................................

使用 weixin客户端 扫描下面的二维码来关注小麦苗的weixin公众号( xiaomaimiaolhr )及QQ群(DBA宝典)、添加小麦苗weixin, 学习最实用的数据库技术。

........................................................................................................................

欢迎与我联系

 

 



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2215349/,如需转载,请注明出处,否则将追究法律责任。

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值