当前位置: 移动技术网 > IT编程>数据库>Oracle > Oracle:Redhat 7.4+Oracle Rac 11.2.0.4 执行root.sh报错处理

Oracle:Redhat 7.4+Oracle Rac 11.2.0.4 执行root.sh报错处理

2019年08月14日  | 移动技术网IT编程  | 我要评论
一、报错信息 二、原因分析 因为RHEL 7使用systemd而不是initd运行进程和重启进程,而root.sh通过传统的initd运行ohasd进程 三、解决办法 在RHEL 7中ohasd需要被设置为一个服务,在运行脚本root.sh之前。 1、以root用户创建服务文件touch /usr/ ...

一、报错信息

二、原因分析

因为rhel 7使用systemd而不是initd运行进程和重启进程,而root.sh通过传统的initd运行ohasd进程

三、解决办法

在rhel 7中ohasd需要被设置为一个服务,在运行脚本root.sh之前。

1、以root用户创建服务文件
touch /usr/lib/systemd/system/ohas.service
chmod 777 /usr/lib/systemd/system/ohas.service

将以下内容添加到新创建的ohas.service文件中
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

以root用户运行下面的命令
systemctl daemon-reload
systemctl enable ohas.service
systemctl start ohas.service

2、验证
systemctl status ohas.service

停止运行root.sh脚本后再进行该操作,然后运行root.sh脚本

 

如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网