运行root.sh脚本的时候报错

报错信息:

[root@rac1 ~]# /u01/app/oraInventory/orainstRoot.sh 
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@zjdb1 ~]# /u01/app/11.2.0/grid/root.sh 
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
  root wallet
  root wallet cert
  root cert export
  peer wallet
  profile reader wallet
  pa wallet
  peer wallet keys
  pa wallet keys
  peer cert request
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow: 
2015-05-23 23:37:45.460: 
[client(13782)]CRS-2101:The OLR was formatted using version 3.

报错原因:

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

解决方法:

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

含义:把集群添加到inittab服务,启动ohasd失败

inittab为linux初始化文件系统时init初始化程序用到的配置文件。这个文件负责设置init初始化程序初始化脚本在哪里;
每个运行级初始化时运行的命令; 开机、关机、重启对应的命令;各运行级登陆时所运行的命令。

但是linux 7使用systemd替代了原来的initd来运行进程,重启进程。

运行root.sh的时候,采用以前的initd来启动ohasd服务,找不到目录,所以启动失败

CentOS 7 使用systemd替换了SysV。Systemd目的是要取代Unix时代以来一直在使用的init系统,兼容SysV和LSB的启动脚本,而且够在进程启动过程中更有效地引导加载服务。

systemd的特性有:

支持并行化任务
同时采用socket式与D-Bus总线式激活服务
按需启动守护进程(daemon)
利用 Linux 的 cgroups 监视进程
支持快照和系统恢复
维护挂载点和自动挂载点
各服务间基于依赖关系进行精密控制

解决方法:

单独在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

note:把如上部分的内容添加到文件里面

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的状态

linux7 安装rac 执行root脚本时候报错的更多相关文章

  1. centos 6.7 (UDEV,、etc/hosts)安装 RAC 11.2.0.4 报错处理

    环境说明: ​db 11.2.0.4        os: centos 6.7    UDEV管理ASM      没有配置DNS服务器,采用/etc/hosts​报错: ​1.    CVU(Cl ...

  2. 关于deepin下安装ssh以后root用户登陆报错的解决

    最近刚刚接触到deepin,觉得,wow,除了mac,还有这么好看的非win系统,而且第测出那个Linux,宽容度很高,非常适合我这种比较喜欢折腾的人,于是下载了deepin15版本并将其当作虚拟机成 ...

  3. CentOS 下 安装 nginx 执行配置命令 ./configure 报错

    CentOS 下 安装 nginx 执行配置命令 ./configure --prefix=/opt/nginx --sbin-path=/usr/bin/nginx 时提示以下错误: checkin ...

  4. Nginx + php-fpm 执行 PHP 脚本超时 报错 502 Bad Gateway + 504 Gateway Time-out 的解决办法

    上周写好的发送邮件的计划任务只发送了一部分,检查计划任务日志,发现 502 Bad Gateway 的错误(已经在脚本中设置了 set_time_limit(0)). 后来在网上查找资料,可以通过以下 ...

  5. 执行shell脚本,报错坏的解释器

    在windows下面用editplus编写了一个shell脚本.执行时报错 "/bin/bash^M: 坏的解释器: 没有那个文件或目录 解决方法: 在终端输入sed -i 's/\r$// ...

  6. 解决方法:loadrunner 场景下执行webservice脚本是---报错10492 Error: Exception was raised when calling per-process-init function in extens

    在vug下执行时,脚本无异常,但是在controller下执行时报下面错误,网上查了下,解决方法千奇百怪,但无一可行. 分析了下错误,似乎是初始化进程有关.想到rts中的设置习惯时以线程方式执行. 遂 ...

  7. 安装ORACLE高可用RAC集群11g执行root脚本的输出信息

    安装ORACLE高可用RAC集群11g执行root脚本的输出信息 作者:Eric 微信:loveoracle11g [root@node1 ~]# /u01/app/oraInventory/orai ...

  8. 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:4.安装Oracle RAC FAQ-4.1.系统界面报错Gnome

    1.错误信息:登录系统后,屏幕弹出几个错误对话框,无菜单.无按钮 GConf error: Failed to contact configuration server; some possible ...

  9. 安装php时,make步骤报错make: *** [ext/gd/gd.lo] Error 1

    安装PHP时,make步骤报错make: *** [ext/gd/gd.lo] Error 1 /usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/ ...

随机推荐

  1. C#DataTable添加列、C#指定位置添加列

    DataSet ds = SQlHelper.GetDataTable(Con, sb.ToString()); ds.Tables[].Columns.Add("Check", ...

  2. 2018-12-03 VS Code英汉词典插件v0.0.7-尝试词性搭配

    续上文VS Code英汉词典插件v0.0.6-改为TS实现, 加测试后, 继续重构(提取常量, 避免var, 添加类型等等), 并完善测试. 测试方法参考: Testing Visual Studio ...

  3. 初识HTTP协议web开发

    HTTP协议  HTTP协议简介 超文本传输协议(英文:HyperText Transfer Protocol,缩写:HTTP)是一种用于分布式.协作式和超媒体信息系统的应用层协议.HTTP是万维网的 ...

  4. writing objects : 值%停住

    在git bush 中使用命令:git config --global http.postBuffer 524288000 因为git上传,限定一次push命令的buffer大小.

  5. 在C++的函数中如何指定一个数组,使得这个数组的大小由函数的输入值来决定

    今天调试一个C++程序,在一个函数中定义了一个一维数组,设定数组的大小由函数的输入值来决定. 是这样子的: ]; 然后发现:报错! 报错是这样的: 那么问题来了,在C++中定义数组一定要指定数组大小么 ...

  6. LVS + HAProxy实现跨网负载均衡

  7. Android为TV端助力 运算符&,|,^

    1.&按位“与”的计算是把两个数字分别写成二进制形式,然后按照每一位进行比较,&计算中,只要有一个是0就算成02.|运算转换成2进制进行比较,两个位只要有一个为1,那么结果就是1,否则 ...

  8. Testlink1.9.17使用方法(第十一章 其他易用性功能)

    第十一章 其他易用性功能 QQ交流群:585499566 一. 自定义 一). 自定义字段管理 在主页点击[自定义字段管理]按钮-->进入自定义字段管理页面,点击[创建]按钮,可以创建一个字段, ...

  9. 用C++对C++语法格式进行分析

    前言 最近C++项目需要用到脚本,这就关系到如何绑定对象到脚本运行环境.因使用到多套脚本语言,所以现有的绑定技术,都不能满足需求.所以只能寻求解析C++的头文件,再根据描述进行绑定.起初发现boost ...

  10. shell编程—变量(三)

    在shell脚本中,变量分两种,系统变量和自定义变量. 系统默认变量是系统自带的一些变量,如path为路径变量 用户自定义变量为在编写吧脚本的时候自己定义的一些变量 变量名命名规则 首个字符必须为字母 ...