This is the continuing guideline of "Tomcat 6 installation guide for Feisty". It is about the basic setting between tomcat 6 and apache 2 which make them work better, and I hope you enjoy it!
Step 1: install the libapache2-mod-jk
sudo apt-get install libapache2-mod-jk
Step 2: After that, check whether there is jk.load in the apache 2 modules
sudo ls /etc/apache2/mods-enabled/
If your result like this, that's fine:
cgi.load mod-security.conf php5.conf proxy.conf rewrite.load userdir.load
jk.load mod-security.load php5.load proxy.load userdir.conf
Step 3: Edit and save the two lines of workers.properties
sudo vi /etc/libapache2-mod-jk/workers.properties
workers.tomcat_home=/usr/share/tomcat6
workers.java_home=/usr/lib/Java6U1
Step 4: apache2.conf setting
Open and copy all the content in httpd_example_apache2.conf
sudo vi /usr/share/doc/libapache2-mod-jk/httpd_example_apache2.conf
then paste the content following the last line of apache2.conf
Step 5: Edit rc.local
sudo vi /etc/rc.local
export JDK_HOME=/usr/lib/Java6u1
export JAVA_HOME=/usr/lib/Java6u1
[Step 6: Restart apache2
sudo /etc/init.d/apache2 restart
Step 7: Restart tomcat
sudo /usr/share/tomcat6/bin/./shutdown.sh
sudo /usr/share/tomcat6/bin/./startup.sh
Now the basic setting is finished, then load your jsp files to usr/share/tomcat6/webapps/ROOT
No comments:
Post a Comment