export JAVA_HOME="/usr/lib/jvm/java"
export CATALINA_HOME="/data/installation/tomcat/"
export JRE_HOME="/usr/lib/jvm/java/jre"
Step-1:-
Install java:-
rpm –ivh jre-6u12-linux-i586.rpm
Step-2:-
Install Apache:- (Default port:--> 80)
1. Download Apache and unpack the apache source.
$ tar –xzvf httpd-2.2.11.tar.gz
$ mkdir apache0
2. In the Apache Source Directory, type the following commands. :-
$ ./configure --prefix=/data/installation/httpd --enable-so --enable-cgi --enable-info --enable-rewrite --enable-speling --enable-usertrack --enable-deflate --enable-ssl --enable-mime-magic --enable-proxy
$ make
$ make install
$ vi /data/installation/httpd/conf/httpd.conf
Edit the Following Line in httpd.conf:-
# Listen 80
To:-
Listen IP:Port
e.g:-
Listen 10.10.10.1:30000
Step-3:-
Install Tomcat:-
$ tar –xzvf apache-tomcat-6.0.18.tar.gz
$ mv apache-tomcat-6.0.18.src tomcat
$ export JAVA_HOME=/usr/lib/jvm/java
$ export JRE_HOME=/usr/lib/jvm/java/jre
$ export CATALINA_HOME=/data/installation/tomcat
In /data/installation/tomcat/bin/catalina.sh file add these things:-
export JAVA_HOME=/usr/lib/jvm/javaexport JRE_HOME=/usr/lib/jvm/java/jre
$ vi /data/installation/tomcat/conf/server.xml
And edit the port if you want to any port:-
The Default port is 8080
Step-4:-
Install mod_jk connector:-
$ tar –xzvf tomcat-connectors-1.2.27-src.tar.gz
$ mv tomcat-connectors-1.2.27-src.tar.gz connector
$ cd ./connector/native/
$ ./configure --with-apxs=/data/installation/httpd/bin/apxs --with-tomcat=/data/installation/tomcat --with-java-home=/usr/lib/jvm/java
$ make
$ make install
-->A file named mod_jk.so will be copied to=
/data/installation/httpd/modules/
Step-5:-
$ vi /data/installation/httpd/conf/workers.properties
Now, comment each and every Line.And add the following lines:-->
workers.tomcat_home=/data/installation/tomcat
workers.java_home=/usr/lib/jvm/java
ps=/
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=127.0.0.1
worker.worker1.type=ajp13
Step-6:-
$ vi /data/installation/httpd/conf/httpd.conf
Now, Add the following lines at the end of the httpd.conf file:-
LoadModule jk_module "/data/installation/httpd/modules/mod_jk.so"
JkWorkersFile "/data/installation/httpd/conf/workers.properties"
JkLogFile "/data/installation/httpd/logs/mod_jk.log"
JkLogLevel error
JkMount /* worker1
Step-7:-
$ cd /data/installation/tomcat/bin/
$ ./catalina.sh start
$ cd /data/installation/httpd/bin
$ ./apachectl start
No comments:
Post a Comment