redhat7 oracle rac11,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 start8 Failed to start the Clusterware. Last 20lines 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 forinit.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.service25

26 touch /usr/lib/systemd/system/ohasd.service27

28 (2).编辑文件ohasd.service添加如下内容29

30 vi /usr/lib/systemd/system/ohasd.service31

32 [Unit]33 Description=Oracle High Availability Services34 After=syslog.target35

36 [Service]37 ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple38 Restart=always39

40 [Install]41 WantedBy=multi-user.target42

43 (3).添加和启动服务44

45 systemctl daemon-reload46 systemctl enable ohasd.service47 systemctl start ohasd.service48

49 查看运行状态:50

51 [root@rac1 system]# systemctl status ohasd.service52 ● ohasd.service -Oracle High Availability Services53 Loaded: loaded (/usr/lib/systemd/system/ohasd.service; enabled; vendor preset: disabled)54 Active: active (running) since Thu 2018-04-19 14:10:19CST; 1h 16min ago55 Main PID: 1210(init.ohasd)56 CGroup: /system.slice/ohasd.service57 └─1210 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple58

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.mk73 vi /u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk74 找到 $(MK_EMAGENT_NMECTL) 这一行,在后面添加 -lnnz11 如下:75 $(MK_EMAGENT_NMECTL) -lnnz1176 然后点击retry 即可77

78

79 报错信息80 [root@rac1 ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -verbose -force81 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了!记录一下

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值