centos 7安装rac 11gR2时运行root.sh报错找不到ohas服务(ohasd failed to start)

流过昼夜 提交于 2019-12-01 06:18:19

单独在linux 7中为ohasd设置一个服务。
步骤如下
1. 创建服务ohas.service的服务文件并赋予权限
touch /usr/lib/systemd/system/ohas.service
chmod 777 /usr/lib/systemd/system/ohas.service

2. 往ohas.service服务文件添加启动ohasd的相关信息

 vi /usr/lib/systemd/system/ohas.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 ohas.service
手工启动ohas服务
systemctl start ohas.service

4. 重新运行root.sh脚本

sh root.sh
报错消失

5:查看ohas服务状态

systemctl status ohas.service
可以看到ohasd已经处于running的状态


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!