[Oracle DataBase Server 12.1 installation on Oracle Linux 6.7]: Setup autostart Oracle after reboot

$ vi /etc/oratab

replace

orcl12:/u01/oracle/database/12.1:N

on

# orcl12:/u01/oracle/database/12.1:N
orcl12:/u01/oracle/database/12.1:Y


Creating script for autostart Oracle after reboot

Next script we add to autostart (execute next commnds after this script):



# cd /tmp
# wget -O startupOracleDatabase12R1 https://github.com/oradev/oracle-dba-scripts/raw/master/oracle_12R1_startup_and_shutdown_script
# mv startupOracleDatabase12R1 /etc/rc.d/init.d/
# chmod +x /etc/rc.d/init.d/startupOracleDatabase12R1
# chkconfig --add startupOracleDatabase12R1
# chkconfig --level 345 startupOracleDatabase12R1 on