代码改变世界

CentOS7.4 安装 11204 ASM GI 组件时:ohasd failed to start

2021-01-23 18:42  于伟_Jade  阅读(375)  评论(0编辑  收藏  举报

前段时间某客户要求在CENTOS7上部署Oracle 11.2.0.4 single instance && ASM存储,遇到一个比较头疼的问题,好在已经处理完了。

在图形化执行安装程序过程中,按照提示执行root.sh脚本失败,无法创建ohasd守护进程,而造成此现象的根本原因是RHEL7的服务管理机制有变化。

  • Install of Clusterware fails while running root.sh on OL7 - ohasd fails to start (Doc ID 1959008.1)
  • Patch 18370031: RC SCRIPTS (/ETC/RC.D/RC.* , /ETC/INIT.D/* ) ON OL7 FOR CLUSTERWARE

根本解决方法:
MOS提供的方案:

Because Oracle Linux 7 (and Redhat 7) use systemd rather than initd for starting/restarting processes and runs them as a service the current > software install of both 11.2.0.4 & 12.1.0.1 will not succeed because the ohasd process does not start properly.

In OL7 it needs to be set up as a service and patch fix for Bug 18370031 needs to be applied for this , BEFORE you run root.sh when prompted .

Need to apply the patch 18370031 for 11.2.0.4 .

也可以使用手工添加服务的方式配置ohasd服务自启动:

touch /usr/lib/systemd/system/ohas.service
chmod 777 /usr/lib/systemd/system/ohas.service

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

# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
#
# Oracle OHASD startup

[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

 添加启动服务:

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

检查服务运行状态:

systemctl status ohasd.service 

按提示清除先前执行root.sh脚本完成的配置,重新执行文件root.sh:

/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/install/roothas.pl -deconfig -force

如图所示: