install java SDK:
download jdk-6u18-linux-x64-rpm.bin from http://java.sun.com/javase/downloads/widget/jdk6.jsp
#./jdk-6u18-linux-x64-rpm.bin


install TOMCAT:
download apache-tomcat-6.0.26.tar.gz from http://tomcat.apache.org/download-60.cgi

unpack tar -xvzf http://tomcat.apache.org/download-60.cgi

move /apache-tomcat-6.0.26 to decide directory such as /opt/tomcat/

set environment variable:
PATH=/usr/java/jdk1.6.0_18/bin:$PATH
CATALINA_HOME=/opt/tomcat
JAVA_HOME=/usr/java/jdk1.6.0_18 <- path to java sdk

set TOMCAT to run as unix daemon:

cd $CATALINA_HOME/bin
tar xvfz jsvc.tar.gz
cd jsvc-src
autoconf
./configure
make
cp jsvc ..
cd ..

command to run tomcat as daemon:

$CATALINA_HOME/bin/jsvc -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

add user in file $CATALINA_HOME/conf/tomcat-users.xml


แสดงความคิดเห็น