O.S Start/Stop script integration until Red Hat/Oracle Linux 6

DMK provides a tiny script which integrated to the boot procedure serves to start & stop all the oracle services smoothly, source code:

cat ${DMK_HOME}/templates/init.d/oracle.linux
#!/bin/bash
...
case "$1" in
'start')
su - oracle -c "$
{DMK_HOME:-/u01/app/oracle/local/dmk}/bin/service_start_stop.ksh start"
touch /var/lock/subsys/oracle
;;
'stop')
su - oracle -c "$
{DMK_HOME:-/u01/app/oracle/local/dmk}/bin/service_start_stop.ksh stop"
rm -f /var/lock/subsys/oracle
;;
*)
echo "usage $0 {start|stop}"
exit 1
;;
esac

Below, all steps for the implementation & integration into the boot sequence:

  • Firstly, copy the script to the β€œ/etc/init.d” and set the correct privileges as the user root.

  • Secondly, integrate the new script to the boot sequence (again as root)

All necessary metadata for the Run-Levels are available within the script.

  • Verify the integration

  • Finally run the script

Last updated