根据Oracle官方文档描述,Oracle 11g支持在Redhat 7上进行安装 今天准备尝试进行安装,整体步骤与在Redhat%206上基本一致,配置方法详见: 环境准备,此处不再进行赘述但在运行脚本时会遇到故障,具体情况如下
一、异常描述
二、原因分析
因为RHEL 7使用systemd而不是initd运行进程和重启进程,而root.sh通过传统的initd运行ohasd进程。
三、解决方案
在RHEL 7中ohasd需要被设置为一个服务,在运行脚本root.sh之前。
以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
验证
systemctl status ohas.service

注意:以上操作一定要在运行root脚本以后再进行配置,否则会报一下异常 CTRL+C停止运行root.sh脚本后再进行该操作,然后运行root.sh脚本

