1. Login as root and edit /etc/oratab to reflect “Y”
orcl:/opt/oracle/product/11.1.0/db_1:Y
  1. oracle startup script:
#!/bin/bash
#
# oracle Init file for starting and stopping
# Oracle Database. Script is valid for 10g and 11g versions.
#
# chkconfig: 35 80 30
# description: Oracle Database startup script
 
# Source function library.
 
. /etc/rc.d/init.d/functions
 
ORACLE_OWNER="oracle"
ORACLE_HOME="/opt/oracle/product/11.1.0/db_1"
 
case "$1" in
start)
echo -n $"Starting Oracle DB:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
echo "OK"
;;
stop)
echo -n $"Stopping Oracle DB:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
echo "OK"
;;
*)
echo $"Usage: $0 {start|stop}"
esac
  1. Oracle EMCTL
#!/bin/bash
#
# oraemctl Starting and stopping Oracle Enterprise Manager Database Control.
# Script is valid for 10g and 11g versions.
#
# chkconfig: 35 80 30
# description: Enterprise Manager DB Control startup script
 
# Source function library.
 
. /etc/rc.d/init.d/functions
 
ORACLE_OWNER="oracle"
ORACLE_HOME="/opt/oracle/product/11.1.0/db_1"
 
case "$1" in
start)
echo -n $"Starting Oracle EM DB Console:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole"
echo "OK"
;;
stop)
echo -n $"Stopping Oracle EM DB Console:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
echo "OK"
;;
*)
echo $"Usage: $0 {start|stop}"
esac
  1. chkconfig –add /etc/init.d/oracle
  2. chkconfig –add /etc/init.d/oraemctl