Installing on Debian Etch

From OpenCms Wiki
Jump to: navigation, search

Installing the necessary software

apt-get update
apt-get install sun-java5-jdk sun-java5-jre
update-alternatives --config java
update-alternatives --config javac
apt-get install tomcat5.5

In case you also want the tomcat-example-webapps and the admin-interface, install also the following packages:

apt-get install tomcat5.5-admin tomcat5.5-webapps 

In case you want to run an ordinary Apache as a proxy in front of Tomcat, also install the apache2.2 package, it includes the necessary mod_proxy and mod_proxy_http, as well as rewrite:

apt-get install apache2-mpm-prefork apache2.2-common
a2enmod proxy proxy_http proxy_ajp rewrite

Configuring Apache Tomcat 5.5

The file /etc/default/tomcat5.5 holds some configuration which we need to change: Change the following parameters:

#We have plenty of RAM, let's give it to Tomcat:
CATALINA_OPTS="-Djava.awt.headless=true -Xms512M -Xmx2048M -server"
TOMCAT5_SECURITY=no

Add a user for managing tomcat, do to this, edit the file /etc/tomcat5.5/tomcat-users.xml and make it look like this:

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
 <role rolename="tomcat"/>
 <role rolename="admin"/>
 <role rolename="manager"/>
 <user username="tomcat" password="tomcat" roles="tomcat"/>
 <user username="admin" password="admin" roles="admin,manager"/>
</tomcat-users>

So your user for managing tomcat will be "admin", with the password "admin".

Now, let's restart tomcat:

/etc/init.d/tomcat5.5 restart

To see if all worked so far, navigate to http://localhost:8180/ and you should see the welcome-page of tomcat. Click on "Tomcat Manager" and enter admin/admin to check if your newly created user works

Deploying the opencms.war file

First, stop Tomcat, then copy the opencms.war into the webapps folder, and start Tomcat again:

/etc/init.d/tomcat5.5 stop
cp opencms.war /var/lib/tomcat5.5/webapps/
/etc/init.d/tomcat5.5 start
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox