LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-23-2010, 01:08 AM   #1
ytd
Member
 
Registered: Jan 2009
Posts: 205

Rep: Reputation: 31
How to automaticall start apache-tomcat-6.0.20


Hello everyone

I want to configure apache-tomcat-6.0.20 to start automatically at system start up.

I'm using Red Hat Enterprise Linux AS release 3 (Taroon).

How can I put it in /etc/init.d/tomcat ?
And after I create /etc/init.d/tomcat I do chkconfig tomcat on and that's all ?

LE:
Hey, I've found this:

http://www.raibledesigns.com/tomcat/boot-howto.html

I'm gonna see if it works, I hope I won't crash anything.
I'm gonna backup the original functions. :P

bb

LE LE:

`Aight, looks like I got it to work.

[root@xxx rc5.d]# /etc/init.d/tomcat stop
Using CATALINA_BASE: /apache-tomcat-6.0.20/
Using CATALINA_HOME: /apache-tomcat-6.0.20/
Using CATALINA_TMPDIR: /apache-tomcat-6.0.20//temp
Using JRE_HOME: /usr/java/default
[root@xxx rc5.d]# /etc/init.d/tomcat start
Using CATALINA_BASE: /apache-tomcat-6.0.20/
Using CATALINA_HOME: /apache-tomcat-6.0.20/
Using CATALINA_TMPDIR: /apache-tomcat-6.0.20//temp
Using JRE_HOME: /usr/java/default
[root@xxx rc5.d]# chkconfig tomcat on
service tomcat does not support chkconfig
[root@xxx rc5.d]#

but... chkconfig does not support tomcat ? Why ? How ? What do I need to do ?

LE: LE: LE:

I don't udnerstand, when it says:
Make a link to it from /etc/rc5.d such as:

cd /etc/rc5.d
sudo ln -s ../init.d/tomcat S71tomcat

it reffers to make a link EXACTLY like in example ? Or I need to make a link for catalina.sh to the /init.d/tomcat S71tomcat ?

atm, I wrote the command exactly as it is:
Make a link to it from /etc/rc5.d such as:

cd /etc/rc5.d
sudo ln -s ../init.d/tomcat S71tomcat

But, I'm not sure if I need to write like that, or not. :P
I don't understand what and why and where should I create the link. And to create a link /init.d/tomcat S71tomcat to what ? To nothing ?

LE: LE: LE: LE:


[root@xxx rc5.d]# /etc/init.d/tomcat status
Using CATALINA_BASE: /apache-tomcat-6.0.20/
Using CATALINA_HOME: /apache-tomcat-6.0.20/
Using CATALINA_TMPDIR: /apache-tomcat-6.0.20//temp
Using JRE_HOME: /usr/java/default
Usage: catalina.sh ( commands ... )
commands:
debug Start Catalina in a debugger
debug -security Debug Catalina with a security manager
jpda start Start Catalina under JPDA debugger
run Start Catalina in the current window
run -security Start in the current window with security manager
start Start Catalina in a separate window
start -security Start in a separate window with security manager
stop Stop Catalina
stop -force Stop Catalina (followed by kill -KILL)
version What version of tomcat are you running?
[root@xxx rc5.d]#
[root@xxx rc5.d]#

Why dosen't it recognize the status of tomcat ? What else do I need to do ?

Last edited by ytd; 04-23-2010 at 01:28 AM.
 
Old 04-26-2010, 07:09 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
To be supported by chkconfig, you just need 2 lines in your init script:

eg.
Code:
# description: Start tomcat
# chkconfig: 345 99 01
The catalina.sh script doesn't seem to support the status command, you may be able to create your own by sourcing the /etc/rc.d/init.d/functions and adding a status case:

Code:
# Source function library.
. /etc/rc.d/init.d/functions

...
  status)
        status $prog
        RETVAL=$?
        ;;
...
hth
 
1 members found this post helpful.
Old 04-27-2010, 12:11 AM   #3
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
Uhmm, I don't know what I did but it's working now, I forgot to close the topic. Thankx anyway mate.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tomcat hang when start with "service tomcat start" zcwlinux Linux - Server 2 07-03-2009 10:45 AM
apache-tomcat and jakarta-tomcat shifter Programming 1 07-28-2007 10:36 PM
Start Tomcat before Apache on boot Swakoo Linux - Server 3 04-10-2007 02:25 AM
How to start Apache and Tomcat with Linux boot montejr Linux - Newbie 2 04-23-2004 02:03 PM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration