To ensure that Oracle starts the service automatically after the next system reboot, we can do this with a shell footstep. Assume that the footstep name is/app/oracle/oraclestart.sh, which reads as follows:
#!/bin/shsu-oracle <<eonexport oracle_sid=ixdbalsnrctl Startsqlplus/nolog <<eofconn/as Sysdbastartupexiteofexiteon
Note that this script is executed as the root user.
Then execute permissions on the script
chmod a+x/app/oracle/oraclestart.sh
In this step, EOF or EON is just a delimiter that can be substituted with any character you like, except that everyone is accustomed to using EOF or EON. When the shell executes its footsteps and finds "<<", the next word is treated as a delimiter, and the content behind the delimiter is treated as input until the shell finds the delimiter again, and the input is considered to be complete. That is, the delimiters are all paired up.
1 for Redhat class systems
Add this footstep to the/etc/rc.local file to ensure that it loads automatically when the system restarts.
echo "/app/oracle/oraclestart.sh" >>/etc/rc.local
2 for SuSE class systems
echo "/app/oracle/oraclestart.sh" >>/etc/rc.d/boot.local
Oracle database automatically starts shell scripts