- Install the packages
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install apache2 sudo apt-get install tomcat6 sudo apt-get install libapache2-mod-jk
- Adjust the startup parameters like heap space, permgen etc. by modifying the file /etc/default/tomcat6
- Uncomment the AJP connector from the server configuration by modifying /var/lib/tomcat6/conf/server.xml
- Add the jk worker properties file by creating a new file /etc/apache2/jk_workers.properties with the following content:
# List of workers worker.list = local, status # Local worker worker.local.type=ajp13 worker.local.host=localhost worker.local.port=8009 # Status worker worker.status.type=status
- Add a new file /etc/apache2/mods_available/jk.conf with the following content:
JkWorkersFile /etc/apache2/jk_workers.properties JkShmFile /var/log/apache2/mod_jk.shm JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info JkLogStampFormat "[%a %b %H:%M:%S %Y]"
- Enable the mods
% cd /etc/apache2/mods-enabled % sudo ln -s ../mods-available/jk.conf jk.conf
- Edit /etc/apache2/sites-available/default and add the JK Mount points. At the end of the file, in the same virtual host definition, add the following:
JkMount /servlet* local JkMount /tomcat-status status
- Reboot the server
% sudo reboot now
Sunday, July 31, 2011
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment