Installing Tomcat6 on Centos 5.4
Facts - Java
Monday, 24 January 2011 20:26

This installation was for me an example of how much more complicated it is to administer a linux machine compared to a windows machine.

I installed Tomcat 6 using the tool yum. It would have been tedious to install it with an rpm since Tomcat has many dependencies on other packages. Yum not only does the downloading of rpm's but sorts out the dependencies and installs them. To get yum working I had to add proxy settings to /etc/yum.conf:

proxy=http://....

I did not have to set a user name or password for my internet proxy. Then I had to add the jpackage yum repository by copying to /etc/yum.repos.d. This involved setting an internet proxy for wget as well.

cd /etc/yum.repos.d
export http_proxy=http://....
wget http://www.jpackage.org/jpackage50.repo
 

Then I was ready to download and install Tomcat:

yum install tomcat6
yum install java-1.6.0-openjdk
yum install tomcat6-admin-webapps
yum install tomcat6-webapps

Make sure the right jdk is installed since Tomcat 6 should run with at least java 1.5. On my system I had to set the following in file /usr/share/tomcat6/conf/tomcat6.conf:

JAVA_HOME="/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64"

Finally I had to set the user rights in file /usr/share/tomcat6/conf/tomcat-users.xml:

<role rolename="admin"/>
<role rolename="manager"/>
<user name="tomcat" password="..." roles="admin,manager" />