i have installed tomcat in /opt/tomcat from a zip file
how can i install it's service; i mean automatically start up in runlevel 5 or 3
moreover if i remove the tomcat now how the services will be cleaned
tomcat
-
- Naib Subedar
- Posts: 344
- Joined: Sat Apr 10, 2004 9:07 pm
- Location: Karachi
- Contact:
tomcat
Use Linux and feel Free.
OR
Feel free to use Linux.
OR
Feel free to use Linux.
Re: tomcat
Dear,saquib_javed wrote:i have installed tomcat in /opt/tomcat from a zip file
how can i install it's service; i mean automatically start up in runlevel 5 or 3
moreover if i remove the tomcat now how the services will be cleaned
Read your documentation, from which method you install , so go in docs and got ur point,
if u install through rpm , so simple rpm -e tomcat*.
Regards
Noman Liaquat Khanzada Rajput
Linux means productivity and fun.
We all love Linux, but it's also a fact that some people might not be able to migrate.
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re: tomcat
Dear saquib_javed,
Salam,
[quote="saquib_javed"]i have installed tomcat in /opt/tomcat from a zip file/quote]
There is a startup and shutdown file in /opt/tomcat/bin check that out it will help you alot.
Best Regards.
Salam,
[quote="saquib_javed"]i have installed tomcat in /opt/tomcat from a zip file/quote]
There is a startup and shutdown file in /opt/tomcat/bin check that out it will help you alot.
Best Regards.
Farrukh Ahmed
-
- Naib Subedar
- Posts: 344
- Joined: Sat Apr 10, 2004 9:07 pm
- Location: Karachi
- Contact:
thanks dudes i know there are startup and shutdown scripts in bin directory (as a j2ee developer) and still i know that there are the rpms; but i already have mentioned that i have extracted it from a zip file and want to register those startup and shutdown scripts as systems services
Use Linux and feel Free.
OR
Feel free to use Linux.
OR
Feel free to use Linux.
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Dear saquib_javed,
Salam,
# chmod +x /etc/init.d/tomcat
# chkconfig --level 3,5 tomcat on
# /etc/init.d/tomcat start
Best Regards.
Salam,
Copy below script into /etc/init.d/tomcatsaquib_javed wrote:thanks dudes i know there are startup and shutdown scripts in bin directory (as a j2ee developer) and still i know that there are the rpms; but i already have mentioned that i have extracted it from a zip file and want to register those startup and shutdown scripts as systems services
Code: Select all
#!/bin/bash
#
# tomcat
#
# chkconfig:
# description: Start up the Tomcat servlet engine.
# Source function library.
. /etc/init.d/functions
RETVAL=$?
CATALINA_HOME="/opt/tomcat"
case "$1" in
start)
if [ -f $CATALINA_HOME/bin/startup.sh ];
then
echo $"Starting Tomcat"
/bin/su tomcat $CATALINA_HOME/bin/startup.sh
fi
;;
stop)
if [ -f $CATALINA_HOME/bin/shutdown.sh ];
then
echo $"Stopping Tomcat"
/bin/su tomcat $CATALINA_HOME/bin/shutdown.sh
fi
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
;;
esac
exit $RETVAL
# chkconfig --level 3,5 tomcat on
# /etc/init.d/tomcat start
Best Regards.
Farrukh Ahmed
-
- Naib Subedar
- Posts: 344
- Joined: Sat Apr 10, 2004 9:07 pm
- Location: Karachi
- Contact:
-
- Naib Subedar
- Posts: 344
- Joined: Sat Apr 10, 2004 9:07 pm
- Location: Karachi
- Contact: