环境centos7.9 搭建的是RAC的dg 但是用到了asm
参照了资料 https://blog.csdn.net/u010692693/article/details/104712471/
重点:
grid图形界面安装单机asm时可参照 http://blog.itpub.net/70004783/viewspace-2792218/
当执行第二个脚本时
[root@racdg ~]# /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 LOCAL ADD MODE Creating OCR keys for user 'grid', privgrp 'oinstall'.. Operation successful. LOCAL ONLY MODE Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. CRS-4664: Node racdg successfully pinned. Adding Clusterware entries to inittab racdg 2021/09/18 09:18:45 /u01/app/11.2.0/grid/cdata/racdg/backup_20210918_091845.olr Successfully configured Oracle Grid Infrastructure for a Standalone Server [root@racdg ~]# su - grid
当快执行到,以下时,
CRS-4664: Node racdg successfully pinned. Adding Clusterware entries to inittab
新开一个窗口,进入到/etc/init.d/目录一旦出现init.ohasd文件,即root执行
/etc/init.d/init.ohasd run >/dev/null 2>&1
[root@racdg ~]# cd /etc/init.d/ [root@racdg init.d]# ls functions init.ohasd multipathd netconsole network ohasd README
这样就不会出现报错。
继续思考一个问题,系统重启has服务起不来网上也有挺多的解决方法。但是如何系统重启自动启动has呢
重点在这一句
CAUSE The problem is caused by init.ohasd not running, ohasd.bin start up is waiting for init.ohasd acknowledgement, hence it is waiting on the pipe /var/tmp/.oracle/npohasd, it times out and fails to startup after 10minutes.
所以果断将 /etc/init.d/init.ohasd run >/dev/null 2>&1
[root@racdg rc.d]# cat /etc/rc.d/rc.local #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. # # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot. touch /var/lock/subsys/local /etc/init.d/init.ohasd run >/dev/null 2>&1
并且给此文件执行权限
重启系统试一下吧,看看has能否自动随系统启动。
觉得对你有用,给点个赞吧,欢迎分享。