tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darryl Lewis <darryl.le...@unsw.edu.au>
Subject Re: Configuring apache start up at boot and apache Manager GUI
Date Tue, 26 Apr 2011 07:09:43 GMT
Copy and paste the following script into your text editor:


# This is the init script for starting up the
#  Jakarta Tomcat server
#
# chkconfig: 345 91 10
# description: Starts and stops the Tomcat daemon.
#

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

# Get config.
. /etc/sysconfig/network

# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0

tomcat=/usr/local/jakarta-tomcat
startup=$tomcat/bin/startup.sh
shutdown=$tomcat/bin/shutdown.sh
export JAVA_HOME=/usr/local/jdk

start(){
 echo -n $"Starting Tomcat service: "
 #daemon -c
 $startup
 RETVAL=$?
 echo
}

stop(){
 action $"Stopping Tomcat service: " $shutdown
 RETVAL=$?
 echo
}

restart(){
  stop
  start
}


# See how we were called.
case "$1" in
start)
 start
 ;;
stop)
 stop
 ;;
status)
      # This doesn't work ;)
 status tomcat
 ;;
restart)
 restart
 ;;
*)
 echo $"Usage: $0 {start|stop|status|restart}"
 exit 1
esac

exit 0


Edit the lines that start with tomcat and export to match where you installed
tomcat and your jdk.

2. Save to /etc/init.d and chmod


 Save the edited file above to /etc/init.d directory as "tomcat" (at
      least on most newer releases since /etc/init.d is a standard now). Then
      you have to allow execute access to the script, so run:
chmod a+x tomcat



On 26/04/11 3:53 PM, "TSGX" <cyx86@yahoo.com.sg> wrote:



Hi guys,

I am currently using redhat enterprise linux version 4 update 6. I installed
apache tomcat in my test server and it is working (it says that it is
installed when i put localhost:8080 in my browser). Now I have 2 questions
that I would like to ask.

The first is, how do I configure my tomcat such that it starts once the
server is booted up? Is there a website that has step-by-step method? Can
anyone recommend? And I am a newbie in linux, so I would appreciate very
much if the steps are rather simplified (if a website is not provided)

The second issue is when I tried to click on the function buttons like
server status, manager app and host manager, the browser prompts me to
authenticate my username and password. When I can't, it goes to a page which
displays the Error 401. And by following the steps, it instructs me to
change the contents in tomcat-users.xml. I did so and checked and make sure
my code was correct and there were no <--- and ---> to comment off the
codes. But still, the authentication don't work. What should I do? Does
anyone know?

Thanks in advance
--
View this message in context: http://old.nabble.com/Configuring-apache-start-up-at-boot-and-apache-Manager-GUI-tp31475745p31475745.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message