Instaling Tomcat

IMP LINK - http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html</p>

installing  jakarta-tomcat-5.0.28.tar.gz + httpd-2.59.tar.gz with tomcat-connectors-1.2.26-src.tar.gz

1) Install apache using following steps
   - tar -xvzf httpd-2.0.59.tar.gz
   - cd httpd-2.0.59
   - ./configure --prefix=/usr/local/apache2
   - make
   - make install
   - start apache using /usr/local/apache2/bin/apachectl start
   - You can check by opening url http://localhost or http://192.168.4.26. You will see the apache default page here.
   - Or you can check port by $ netstat -tanpu | grep "80"
2) Now install java
  - Install java in /usr/local/java directory. cd /usr/local/java
  - sh jdk-1_5_0_07-linux-i586.bin and follow the steps.
  - ln -s jdk-1_5_0_07   java
  - You have to set JAVA_HOME path as
  - JAVA_HOME=/usr/local/java/java
  - export JAVA_HOME
  - you can check by echo $JAVA_HOME

3) Install tomcat using following steps
  - Extract source jakarta-tomcat-5.0.28.tar.gz in /usr/loca/
  - ln -s jakarta-tomcat-5.0.28   tomcat
  - You can set CATALINA_HOME=/usr/local/tomcat
  - export CATALINA_HOME
  - Start tomcat using CATALINA_HOME/bin/startup.sh
  - You can see the tomcat default page using http://localhost:8080
  - Also check whether 8080 port is open using netstat

4) Install tomcat-connectors-1.2.26-src.tar.gz
 - tar xvzf tomcat-connectors-1.2.26-src.tar.gz
 - cd tomcat-connectors-1.2.26-src/native/
 - ./buildconf.sh
 - ./configure --with-apxs=/usr/local/apache2/bin/apxs
 - make
 - cp /jk/native/apache-2.0/mod_jk.so /usr/loca/apache2//modules

4)  workers.properties
  - vi /usr/local/apache2/conf/worker.properties
  - Add following line in workers.properties
      # Setting variables
   workers.tomcat_home=/usr/local/jakarta/jakarta-tomcat-5.0.28/
   #workers.tomcat_home=/usr/local/jakarta/old_tomcat/tomcat
   workers.java_home=/usr/local/jakarta/jdk1.5.0_07/
   ps=/
   worker.list=wrkr
   worker.wrkr.port=8009
   worker.wrkr.host=localhost
   worker.wrkr.type=ajp13

5)httpd.conf
- Add the line in Mail Server configuration
  -  LoadModule jk_module modules/mod_jk.so
  -   JkWorkersFile "/usr/local/apache2/conf/worker.properties"
      JkLogFile "/usr/local/apache2//logs/mod_jk.log"
      JkLogLevel info
- Add Virtual As like
    
     ServerAdmin b.mahesh@drushti.in
     DocumentRoot /home/htdocs/
     ServerName testtomcat.com
     DirectoryIndex index.jsp
    JkMount /*.jsp wrkr
    JkMount /servlet/* wrkr
   ErrorLog logs/testtomcat.com-error_log
    CustomLog logs/testtomcat.com-access_log common
  

6)
 server.xml
 
www.testtomcat.com
<Context path=""  docBase="/home/htdocs" crossContext="false" debug="0" reloadable="true" >
<Logger className="org.apache.catalina.logger.FileLogger" prefix="testtomcat." suffix=".txt" timestamp="true"/>
  </div>

comments powered by Disqus