[ORACLE] REHL oracle auostart ORACLE 开机自起动

步骤:

1.设置 oratab

[oracle@d4cdb ~]$ cat /etc/oratab |grep -v ^#|grep -v ^$
D4C:/oracle/D4C/193:Y  #change N to Y

2. 更改Oracle 脚本  /oracle/D4C/193/bin/dbstart

ORACLE_HOME_LISTNER=$ORACLE_HOME  #change  

3.设定开机启动

[oracle@d4cdb ~]$ cat /etc/rc.d/rc.local |grep -v ^#|grep  -v ^$
touch /var/lock/subsys/local
su - oracle -c "/oracle/D4C/193/bin/lsnrctl start"  # add start listen
su - oracle -c "/oracle/D4C/193/bin/dbstart"        # add db start

4.add permission of  /etc/rc.d/rc.local

chmod +x /etc/rc.d/rc.local 

5. restart RHEL

reboot
原文地址:https://www.cnblogs.com/tingxin/p/12748582.html