Suresh Payankannur

Sunday, July 31, 2011

Installing Apache + Tomcat on Ubuntu

  1. 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
  2. Adjust the startup parameters like heap space, permgen etc. by modifying the file /etc/default/tomcat6
  3. Uncomment the AJP connector from the server configuration by modifying /var/lib/tomcat6/conf/server.xml
  4. Add the jk worker properties file by creating a new file /etc/apache2/ with the following content:
        # List of workers
        worker.list = local, status
        # Local worker
        # Status worker
  5. Add a new file /etc/apache2/mods_available/jk.conf with the following content:
        JkWorkersFile /etc/apache2/
        JkShmFile     /var/log/apache2/mod_jk.shm
        JkLogFile     /var/log/apache2/mod_jk.log
        JkLogLevel    info
        JkLogStampFormat "[%a %b %H:%M:%S %Y]"
  6. Enable the mods
          % cd /etc/apache2/mods-enabled
          % sudo ln -s ../mods-available/jk.conf jk.conf
  7. 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
  8. Reboot the server
          % sudo reboot now


Post a Comment

Blog Archive

Scroll To Top