rhel7+udev+oracle+11g,rhel 7安装oracle 11gr2 rac 遇到的问题

解决方法:

在RHEL 7中ohasd须要被设置为一个服务,在运行脚本root.sh以前。

步骤以下:

1. 以root用户建立服务文件

#touch /usr/lib/systemd/system/ohas.service

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

2. 将如下内容添加到新建立的ohas.service文件中

[root@rac1 init.d]# cat /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. 以root用户运行下面的命令

systemctl daemon-reload

systemctl enable ohas.service

systemctl start ohas.service

4. 查看运行状态

[root@rac1 init.d]# systemctl status ohas.service

ohas.service - Oracle High Availability Services

Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled)

Active: failed (Result: start-limit) since Fri 2015-09-11 16:07:32 CST; 1s ago

Process: 5734 ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple (code=exited, status=203/EXEC)

Main PID: 5734 (code=exited, status=203/EXEC)

Sep 11 16:07:32 rac1 systemd[1]: Starting Oracle High Availability Services...

Sep 11 16:07:32 rac1 systemd[1]: Started Oracle High Availability Services.

Sep 11 16:07:32 rac1 systemd[1]: ohas.service: main process exited, code=exited, status=203/EXEC

Sep 11 16:07:32 rac1 systemd[1]: Unit ohas.service entered failed state.

Sep 11 16:07:32 rac1 systemd[1]: ohas.service holdoff time over, scheduling restart.

Sep 11 16:07:32 rac1 systemd[1]: Stopping Oracle High Availability Services...

Sep 11 16:07:32 rac1 systemd[1]: Starting Oracle High Availability Services...

Sep 11 16:07:32 rac1 systemd[1]: ohas.service start request repeated too quickly, refusing to start.

Sep 11 16:07:32 rac1 systemd[1]: Failed to start Oracle High Availability Services.

Sep 11 16:07:32 rac1 systemd[1]: Unit ohas.service entered failed state.

此时状态为失败,缘由是如今尚未/etc/init.d/init.ohasd文件。

下面能够运行脚本root.sh 不会再报ohasd failed to start错误了。

若是仍是报ohasd failed to start错误,多是root.sh脚本建立了init.ohasd以后,ohas.service没有立刻启动,解决方法参考如下:

当运行root.sh时,一直刷新/etc/init.d ,直到出现 init.ohasd 文件,立刻手动启动ohas.service服务 命令:systemctl start ohas.service

[root@rac1 init.d]# systemctl status ohas.service

ohas.service - Oracle High Availability Services

Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled)

Active: active (running) since Fri 2015-09-11 16:09:05 CST; 3s ago

Main PID: 6000 (init.ohasd)

CGroup: /system.slice/ohas.service

6000 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple

6026 /bin/sleep 10

Sep 11 16:09:05 rac1 systemd[1]: Starting Oracle High Availability Services...

Sep 11 16:09:05 rac1 systemd[1]: Started Oracle High Availability Services.

Sep 11 16:09:05 rac1 su[6020]: (to grid) root on none

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值