- Get Java Development kit. Depends the version you downloaded, the latest version I got as updated 27th Sept 2007 is jdk-1_5_0_12-linux-i586-rpm.bin.
- make the file executable, then install it:
chmod 777 jdk-1_5_0_12-linux-i586.bin
./jdk-1_5_12-linux-i586.bin
- after install, go into the installed java folder :
- download the apache-tomcat (Please refer to the latest version of apache-tomcat website)
- go into theapache-tomcat installed folder, edit some of the files:
- chmod some permission here:
- now,type:
- ok, now you should have the tomcat installed sucessfully on port 8080. to port it into standard HTTP (80/tcp), you need to have the connector:
- For me I’m use apache 2.2.x, download your mod_jk accord to your apache version here:
# mod_jk-1.2.25-httpd-2.2.4.so is for Apache 2.2.x and works with Apache 2.2.4 and later.
# mod_jk-1.2.25-httpd-2.0.59.so is for Apache 2.0.x and works with Apache 2.0.59 and later.
# mod_jk-1.2.25-httpd-1.3.37-eapi.so is for Apache 1.3.x with EAPI extensions and works with Apache 1.3.37 and later. - edit your apache config:
- go create the mod_jk.conf you just added to httpd.conf
cd /usr/java/jdk1.5.0_12
wget http://download.nextag.com/apache/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip
unzip apache-tomcat-5.5.25.zip
cd bin
vi catalina.sh
add
JAVA_HOME=/usr/java/jdk1.5.0_12
JAVA_OPTS=-Xmx512m
ok, save and exit!
chmod 777 *.sh
./startup.sh
check your Apache version:
cd /etc/httpd/modules/
wget http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.25/i386/mod_jk-1.2.25-httpd-2.2.4.so
vi /etc/httpd/conf/httpd.conf
after:
LoadModule php4_module /usr/lib/apache/libphp4.so
add:
LoadModule evasive20_module /usr/lib/apache/mod_evasive20.so
go to end of file, add:
Include /usr/java/jdk1.5.0_12/apache-tomcat-5.5.25/conf/mod_jk.conf
cd /usr/java/jdk1.5.0_12/apache-tomcat-5.5.25/conf
vi mod_jk.conf
enter the following lines:
<IfModule !mod_jk.c>
LoadModule jk_module /usr/lib/apache/mod_jk.so
</IfModule>
JkWorkersFile “/usr/java/jdk1.5.0_12/apache-tomcat-5.5.25/conf/jk/workers.properties”
JkLogFile “/usr/java/jdk1.5.0_12/apache-tomcat-5.5.25/logs/mod_jk.log”
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /servlets/* ajp13
JkMount /*.do ajp13
JkMount /manager/* ajp13
JkLogLevel emerg
mkdir /usr/java/jdk1.5.0_12/apache-tomcat-5.5.25/conf/jk
vi /usr/java/jdk1.5.0_12/apache-tomcat-5.5.25/conf/jk/workers.properties
# Setting Tomcat & Java Home
workers.tomcat_home=/usr/java/jdk1.5.0_12/apache-tomcat-5.5.25
workers.java_home=/usr/java/jdk1.5.0_12
worker.list=ajp13
worker.ajp13.port=8080
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
vi server.xml
Before the last three lines of original server.xml file
</Engine>
</Service>
</Server>
You can add virtual host entries
Also See:
No user commented in " Install Tomcat on Apache2 / LAMP server "
Follow-up comment rss or Leave a TrackbackLeave A Reply