- Download JDK to say /mnt/downloads/
- cd /usr/local/
- sh /mnt/downloads/jdk1.6.bin
- mv jdk1.6.0_16/ jdk1.6
- vi /etc/profile
export JAVA_HOME=/usr/local/jdk1.6
export PATH=$PATH:$JAVA_HOME/bin
- Download Tomcat to say /mnt/downloads
wget http://www.gtlib.gatech.edu/pub/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
- tar -zxvf apache-tomcat-6.0.20.tar.gz
- mv apache-tomcat-6.0.20 /usr/local/tomcat6
- useradd -d /home/tomcat -s /bin/bash -m tomcat
- chown -R tomcat:tomcat /usr/local/tomcat6/
- test using commans: su – tomcat -c /usr/local/tomcat6/bin/startup.sh
- shutdown: su – tomcat -c /usr/local/tomcat6/bin/shutdown.shconfigure the startup script
or use startup script:
#vi /etc/init.d/tomcat
use the following script:
http://www.linuxzone.org/scripts/tomcat.txt
Add it to chkconfig and turn it on:
# chkconfig --add tomcat
# chkconfig tomcat on