Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 30 September 2010

How to integrate tomcat with apache on cpanel linux server?

Posted on 00:59 by Unknown
Guys,

I didn't configure it but I am making it more available in the internet so that you can easily get the link and steps. Hope it'll help you to do the same. Here are the steps :

=======
1- Configure PATH
- vi or pico -w /etc/profile
- Add those lines after the first comments
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

JAVA_HOME=/usr/local/java/java
CATALINA_HOME=/usr/local/tomcat
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin:/sbin:/usr/sbin
CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/common/lib/servlet.jar:/usr/local/pgsql/share/java/postgresql.jar:../lib/struts.jar:.

- Locate the line where you see export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC and add : JAVA_HOME CATALINA_HOME CLASSPATH


2- Download SDK at http://java.sun.com/j2se/1.4.2/download.html (j2sdk-1_4_2_03-linux-i586.bin)

3- Install java SDK
- mkdir /usr/local/java
- cd /usr/local/java
- chmod u+x j2sdk-version.bin
- ./j2sdk-version.bin
- ln -s j2sdk-version java
JAVA is installed under /usr/local/java/java/

4- Download Jakarta Tomcat at http://apache.mirror.mcgill.ca/jakarta/tomcat-4/v4.1.30/bin/jakarta-tomcat-4.1.30.tar.gz

5- Install Tomcat
- tar -zxvf jakarta-tomcat-4.1.30.tar.gz
- mv jakarta-tomcat-4.1.30 /usr/local/
- cd /usr/local
- ln -s jakarta-tomcat-4.1.30 tomcat
Tomcat is installed under /usr/local/tomcat/

6- Download Jakarta ANT at http://apache.mirror.cygnal.ca/ant/binaries/apache-ant-1.6.1-bin.tar.gz

7- Install Jakarta ANT
- tar -zxvf apache-ant-1.6.1-bin.tar.gz
- mv apache-ant-1.6.1 /usr/local/
- cd /usr/local
- ln -s apache-ant-1.6.1 ant
- ln -s /usr/local/ant/bin/ant /usr/local/bin/ant
- ln -s /usr/local/ant/bin/ant /usr/sbin/

8- Download the Java Connector from CVS and build / install mod_jk
- cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login password: anoncvs (When prompted for a password, just hit ENTER)
- cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout jakarta-tomcat-connectors
- mv jakarta-tomcat-connectors /usr/local/java/
- cd /usr/local/java/jakarta-tomcat-connectors/jk/native/
- ./buildconf.sh
- ./configure --with-apxs=/usr/sbin/apxs
- make
- cp apache-1.3/mod_jk.so /etc/httpd/modules/

9- Configure httpd.conf for mod_jk
- Doing a backup : cp -p /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
- Enabling mod_jk : vi or pico -w /etc/httpd/conf/httpd.conf
After this line :
LoadModule perl_module /usr/lib/apache/libperl.so

Add :
LoadModule jk_module /usr/lib/apache/mod_jk.so

After your last AddModule line, add :
AddModule mod_jk.c

Include "/usr/local/jakarta-tomcat-4.1.30/conf/mod_jk.conf"

10- Edit/Create /usr/local/jakarta-tomcat-4.1.30/conf/mod_jk.conf
- vi or pico -w /usr/local/jakarta-tomcat-4.1.30/conf/mod_jk.conf
- Enter those lines :


LoadModule jk_module /usr/lib/apache/mod_jk.so


JkWorkersFile "/usr/local/jakarta-tomcat-4.1.30/conf/jk/workers.properties"
JkLogFile "/usr/local/jakarta-tomcat-4.1.30/logs/mod_jk.log"


JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /servlets/* ajp13
JkMount /*.do ajp13
JkMount /manager/* ajp13


JkLogLevel emerg

11- Edit/Create /usr/local/jakarta-tomcat-4.1.30/conf/jk/workers.properties
- mkdir /usr/local/jakarta-tomcat-4.1.30/conf/jk
- vi or pico -w /usr/local/jakarta-tomcat-4.1.30/conf/jk/workers.properties
- Enter those lines :

# Setting Tomcat & Java Home
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/java/java
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

12- Edit /usr/local/jakarta-tomcat-4.1.30/conf/server.xml
cd /usr/local/jakarta-tomcat-4.1.30/conf/
rm -f server.xml
vi or pico -w server.xml
Copy - Past text below :










some-site.com








13- Edit /usr/local/jakarta-tomcat-4.1.30/conf/tomcat-users.xml







14- Download and install the tomcatd script
- Download the script at http://www.linuxjava.net/howto/webapp/install_files/tomcatd
- mv tomcatd /usr/sbin
- chmod 700 /usr/sbin/tomcatd
- vi or pico -w /usr/sbin/tomcatd
- Locate any lines that contain the text : su - tomcat -c $TOMCAT_START and replace it by : $TOMCAT_START

15- FINISH !! START TOMCAT AND TEST IT :)
- service httpd restart
- tomcatd start
=======

Ref : http://www.directadmin.com/forum/archive/index.php/t-2227.html

Try :)
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • unable connect to socket: No route to host (113)
    Guys, This error message usually comes when you try to access remote linux desktop using vncviewer. Please check the firewall in the linux s...
  • NDMP communication failure error
    Guys, Issue : Netbackup server sends alert NDMP communication failure once everyday. But there is no issue to run scheduled backup jobs. Env...
  • what does it mean by "cman expected_votes="1" two_node="1" in cluster.conf ?
    For two node clusters ordinarily, the loss of quorum after one out of two nodes fails will prevent the remaining node from continuing (if bo...
  • How to make bridge over VLAN?
    How to make bridge over VLAN? Bridging over VLAN's : By constructing a bridge between a "normal" and a "VLAN" ethern...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • How to install pdo_mysql module with php on 64 bit linux machine?
    Guys, The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. Each database driver ...
  • configure: error: C preprocessor "/lib/cpp" fails sanity check + Resolved
    Guys, I got that error messages when I was going to configure any software on the linux server. I was unable to execute easyapache or ./conf...
  • configure: error: could not find library containing RSA_new
    Guys, It seems you have enabled the SSL option during configuring the package. Please either resolve that dependency or disable the SSL opti...
  • Cannot find config.m4 + phpize +Resolved
    Guys, I got the same error messages and sorted out it. Here is the error that I got. ===== root@server [/home/cpeasyapache/src/php-5.2.9/ext...
  • How to redirect output of script to a file(Need to save log in a file and file should be menioned in the script itself?
    Expectation : @subject Steps : 1. Create a bash script. 2. add line : exec > >(tee /var/log/my_logfile.txt) That's it. All output ...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ►  2013 (5)
    • ►  May (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ▼  2010 (152)
    • ►  December (9)
    • ►  November (34)
    • ►  October (20)
    • ▼  September (14)
      • How to integrate tomcat with apache on cpanel linu...
      • How install MRTG on linux?
      • make: *** [install-webconf] Error 1
      • How to install nagios on cpanel or linux server?
      • How to + extract + untar + unzip .tar.gz file on l...
      • How to repair mysql database or tables of the data...
      • FileList::init() failed: ls_dir_wrapper() failed: ...
      • How to install htop on linux machine?
      • Directory lookup for the file "C:\Program Files\Mi...
      • How to build kernel module + How to develop kernel...
      • How to upgrade kernel on linux?
      • How to manually recompile php on cpanel server?
      • configure: error: This c-client library is built w...
      • How to install suhosin on linux ?
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.