ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

RHEL7或CentOS7安装11.2.0.4 RAC碰到的问题

2019-04-10 13:39:16  阅读:270  来源: 互联网

标签:RHEL7 RAC service ohasd 0.4 11.2 init usr lib


RHEL7或CentOS7安装11.2.0.4 RAC碰到的问题

 1 随着Linux 7 版本的普及,但Oracle数据库主流版本仍是11gR2,11.2.0.4 是生产安装首选。由于11.2.0.4对Linux 7 的支持不很完美,在Linux 7 上安装会遇到几处问题,以此记录下来。
 2 
 3 https://docs.oracle.com/cd/E11882_01/relnotes.112/e23558/toc.htm#CJAJEBGG
 4 
 5 1.安装GI执行root.sh脚本时,ohasd 进程无法正常启动
 6 
 7 ohasd failed to start 
 8 Failed to start the Clusterware. Last 20 lines of the alert log follow:  
 9 2018-04-19 09:54:30.897:  
10 [client(19244)]CRS-2101:The OLR was formatted using version 3.
11 
12 alert:
13 
14 Oracle High Availability Service has timed out waiting for init.ohasd to be started.
15 
16 因为Oracle Linux 7(和Redhat 7)使用systemd而不是initd来启动/重新启动进程,并将它们作为服务运行,所以当前的11.2.0.4和12.1.0.1的软件安装不会成功,因为ohasd进程没有正常启动。
17 
18 解决方法一:
19 
20 在root.sh执行之前先打上补丁:18370031。
21 
22 解决方法二:手动在systemd中添加ohasd服务
23 
24 (1).创建一个空服务文件:/usr/lib/systemd/system/ohasd.service
25 
26 touch /usr/lib/systemd/system/ohasd.service
27 
28 (2).编辑文件ohasd.service添加如下内容
29 
30 vi   /usr/lib/systemd/system/ohasd.service
31 
32 [Unit] 
33 Description=Oracle High Availability Services 
34 After=syslog.target 
35 
36 [Service] 
37 ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple 
38 Restart=always 
39 
40 [Install] 
41 WantedBy=multi-user.target
42 
43 (3).添加和启动服务
44 
45 systemctl daemon-reload 
46 systemctl enable ohasd.service 
47 systemctl start ohasd.service
48 
49 查看运行状态:
50 
51 [root@rac1 system]# systemctl status ohasd.service 
52 ● ohasd.service - Oracle High Availability Services 
53 Loaded: loaded (/usr/lib/systemd/system/ohasd.service; enabled; vendor preset: disabled) 
54 Active: active (running) since Thu 2018-04-19 14:10:19 CST; 1h 16min ago 
55 Main PID: 1210 (init.ohasd) 
56 CGroup: /system.slice/ohasd.service 
57 └─1210 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
58 
59 Apr 19 14:10:19 bms-75c8 systemd[1]: Started Oracle High Availability Services. 
60 Apr 19 14:10:19 bms-75c8 systemd[1]: Starting Oracle High Availability Services...
61 
62 (4).重新执行root.sh脚本
63 
64 注意: 为了避免其余节点遇到这种报错,可以在root.sh执行过程中,待/etc/init.d/目录下生成了init.ohasd 文件后执行systemctl start ohasd.service 启动ohasd服务即可。若没有/etc/init.d/init.ohasd文件 systemctl start ohasd.service 则会启动失败。
65 
66 2.安装database软件,在执行root.sh脚本的时候会报错:
67 
68 Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk'
69 解决方法一: 
70 选择 继续,然后打上补丁:19692824 
71 解决方法二:
72 编辑文件 $ORACLE_HOME/sysman/lib/ins_emagent.mk
73 vi /u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk
74 找到 $(MK_EMAGENT_NMECTL) 这一行,在后面添加 -lnnz11 如下:
75 $(MK_EMAGENT_NMECTL) -lnnz11
76 然后点击retry 即可
77 
78 
79 报错信息
80 [root@rac1 ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -verbose -force
81 Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perlusr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /u01/app/11.2.0/grid/crs/install) at /u01/app/11.2.0/gd/crs/install/crsconfig_lib.pm line 703.
82 BEGIN failed--compilation aborted at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 703.
83 Compilation failed in require at /u01/app/11.2.0/grid/crs/install/rootcrs.pl line 305.
84 BEGIN failed--compilation aborted at /u01/app/11.2.0/grid/crs/install/rootcrs.pl line 305.
85 
86 
87 解决方法:
88 
89 根据提示信息Can't locate Env.pm 可以知道找不到这玩意了。所以cp一份过去
90 
91 [root@rac2 ~]#cp -p /u01/app/11.2.0/grid/perl/lib/5.10.0/Env.pm /usr/lib64/perl5/vendor_perl/
92 
93 就OK了!记录一下

标签:RHEL7,RAC,service,ohasd,0.4,11.2,init,usr,lib
来源: https://www.cnblogs.com/zhouwanchun/p/10682917.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有