RHEL7或CentOS7安装11.2.0.4 RAC碰到的问题
随着Linux 版本的普及,但Oracle数据库主流版本仍是11gR2, 的支持不很完美,在Linux 上安装会遇到几处问题,以此记录下来。 https://docs.oracle.com/cd/E11882_01/relnotes.112/e23558/toc.htm#CJAJEBGG .安装GI执行root.sh脚本时,ohasd 进程无法正常启动 ohasd failed to start Failed to start the Clusterware. Last lines of the alert log follow: -- ::30.897: [client()]CRS-:The OLR was formatted using version . alert: Oracle High Availability Service has timed out waiting for init.ohasd to be started. 因为Oracle Linux (和Redhat )使用systemd而不是initd来启动/重新启动进程,并将它们作为服务运行,所以当前的11.2.0.4和12.1.0.1的软件安装不会成功,因为ohasd进程没有正常启动。 解决方法一: 在root.sh执行之前先打上补丁:。 解决方法二:手动在systemd中添加ohasd服务 ().创建一个空服务文件:/usr/lib/systemd/system/ohasd.service touch /usr/lib/systemd/system/ohasd.service ().编辑文件ohasd.service添加如下内容 vi /usr/lib/systemd/system/ohasd.service [Unit] Description=Oracle High Availability Services After=syslog.target [Service] ExecStart=/etc/init.d/init.ohasd run >/dev/>& Type=simple Restart=always [Install] WantedBy=multi-user.target ().添加和启动服务 systemctl daemon-reload systemctl enable ohasd.service systemctl start ohasd.service 查看运行状态: [root@rac1 system]# systemctl status ohasd.service ● ohasd.service - Oracle High Availability Services Loaded: loaded (/usr/lib/systemd/system/ohasd.service; enabled; vendor preset: disabled) Active: active (running) since Thu -- :: CST; 1h 16min ago Main PID: (init.ohasd) CGroup: /system.slice/ohasd.service └─ /bin/>& Type=simple Apr :: bms-75c8 systemd[]: Started Oracle High Availability Services. Apr :: bms-75c8 systemd[]: Starting Oracle High Availability Services... ().重新执行root.sh脚本 注意: 为了避免其余节点遇到这种报错,可以在root.sh执行过程中,待/etc/init.d/目录下生成了init.ohasd 文件后执行systemctl start ohasd.service 启动ohasd服务即可。若没有/etc/init.d/init.ohasd文件 systemctl start ohasd.service 则会启动失败。 .安装database软件,在执行root.sh脚本的时候会报错: Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk' 解决方法一: 选择 继续,然后打上补丁: 解决方法二: 编辑文件 $ORACLE_HOME/sysman/lib/ins_emagent.mk /db_1/sysman/lib/ins_emagent.mk 找到 $(MK_EMAGENT_NMECTL) 这一行,在后面添加 -lnnz11 如下: $(MK_EMAGENT_NMECTL) -lnnz11 然后点击retry 即可 报错信息 [root@rac1 ~]# /u01/app//grid/crs/install/rootcrs.pl -deconfig -verbose -force 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. BEGIN failed--compilation aborted at /u01/app//grid/crs/. Compilation failed /grid/crs/. BEGIN failed--compilation aborted at /u01/app//grid/crs/. 解决方法: 根据提示信息Can't locate Env.pm 可以知道找不到这玩意了。所以cp一份过去 [root@rac2 ~]#/grid//Env.pm /usr/lib64/perl5/vendor_perl/ 就OK了!记录一下