Monday, April 25, 2011

Setting up Apache2 and Tomcat6 on Ubuntu 10.04

This is a short post on setting up Apache2 and Tomcat6

Install Java
apt-get -y install python-software-properties
add-apt-repository "deb lucid partner"
apt-get update
apt-get install -y sun-java6-jdk

Install tomcat6 with apache2 support
apt-get -y install tomcat6 libtcnative-1 libapache2-mod-jk

Setup with the following values:
nano /etc/libapache2-mod-jk/

Modify /etc/apache2/mods-available/jk.load
cat >>/etc/apache2/mods-available/jk.load <<EOF
JkWorkersFile /etc/libapache2-mod-jk/
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel error

Setup virtual host
cat >/etc/apache2/sites-available/ <<EOF
NameVirtualHost *
<VirtualHost *>
        JkMount /* ajp13_worker

Activate the site

Setup tomcat for ajp13
nano /etc/tomcat6/server.xml

Restart tomcat and apache2
service tomcat6 restart
service apache2 restart

Install and configure UFW
apt-get install ufw
ufw allow ssh
ufw allow http
ufw enable

Install and configure Tripwire
apt-get install tripwire

I hope you found the post useful. You can subscribe via email or subscribe via a feed reader to get relevant updates from this blog. Have a nice day.

No comments:

Post a Comment