tomcat

Discussion of programming on Linux, including shell scripting, perl, python, c/c++, mono, java. Whatever tickles your fancy.

tomcat

Postby saquib_javed » Wed Mar 07, 2007 5:56 pm

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
Use Linux and feel Free.
OR
Feel free to use Linux. ;)
saquib_javed
Naib Subedar
 
Posts: 344
Joined: Sat Apr 10, 2004 9:07 pm
Website: http://www17.brinkster.com/saquibjaved
Location: Karachi

Re: tomcat

Postby nomankhn » Wed Mar 07, 2007 7:06 pm

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


Dear,

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.
nomankhn
Colonel
 
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Re: tomcat

Postby LinuxFreaK » Thu Mar 08, 2007 9:08 am

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.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

Postby saquib_javed » Thu Mar 08, 2007 9:20 am

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. ;)
saquib_javed
Naib Subedar
 
Posts: 344
Joined: Sat Apr 10, 2004 9:07 pm
Website: http://www17.brinkster.com/saquibjaved
Location: Karachi

Re:

Postby LinuxFreaK » Thu Mar 08, 2007 9:27 am

Dear saquib_javed,
Salam,

saquib_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
:?


Copy below script into /etc/init.d/tomcat

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


# chmod +x /etc/init.d/tomcat
# chkconfig --level 3,5 tomcat on
# /etc/init.d/tomcat start


Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

Postby saquib_javed » Fri Mar 09, 2007 8:59 am

:D
Oh yes thats what i wanted to do
thanks LinuxFreaK
:D
thanks man
Use Linux and feel Free.

OR

Feel free to use Linux. ;)
saquib_javed
Naib Subedar
 
Posts: 344
Joined: Sat Apr 10, 2004 9:07 pm
Website: http://www17.brinkster.com/saquibjaved
Location: Karachi

Postby nomankhn » Wed Mar 14, 2007 9:58 am

Wah wah,

kia bat ha, be happy.

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.
nomankhn
Colonel
 
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Postby saquib_javed » Thu Mar 15, 2007 11:20 am

??? :?
Use Linux and feel Free.

OR

Feel free to use Linux. ;)
saquib_javed
Naib Subedar
 
Posts: 344
Joined: Sat Apr 10, 2004 9:07 pm
Website: http://www17.brinkster.com/saquibjaved
Location: Karachi


Return to “%s” Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron