copy this code to a file with .sh extension (linux shell script), move file to /etc/init.d then create link in rc5.d and rc3.d. This script will be execute by Linux services during startup and shutdown

below is the script :

# chkconfig: 35 95 1
# description: init script to start/stop oracle database 10g, TNS listener, EMS
#
#
# match these values to your environment: 

export ORACLE_BASE=/usr/u01/app/oracle
export ORACLE_HOME=/usr/u01/app/oracle/product/10.2.0.1
export ORACLE_TERM=xterm
export PATH=/home/oracle/bin:$ORACLE_HOME/bin:$PATH
export ORACLE_SID=orcl
export DISPLAY=<your ip address>:0
export ORACLE_USER=oracle

# see how we are called:
case $1 in
start)
su - "$ORACLE_USER"<<EOO
lsnrctl start
sqlplus /nolog<<EOS
connect / as sysdba
startup
EOS
emctl start dbconsole
EOO
;;

stop)
su - "$ORACLE_USER"<<EOO
lsnrctl stop
sqlplus /nolog<<EOS
connect / as sysdba
shutdown immediate
EOS
emctl stop dbconsole
EOO
;;

*)
echo "Usage: $0 {start|stop}"
;;
esac

hope it will be useful