Jump to Navigation

140 - Tomcat Installation on RedHat OS

1. Installation

# yum install tomcat5 tomcat5-webapps tomcat5-admin-webapps

* tomcat5 root directory :  /usr/share/tomcat5

All directory should be symbolic links

common -> /var/lib/tomcat5/common
conf -> /etc/tomcat5
logs -> /var/log/tomcat5
server -> /var/lib/tomcat5/server
shared -> /var/lib/tomcat5/shared
temp -> /var/cache/tomcat5/temp
webapps -> /var/lib/tomcat5/webapps
work -> /var/cache/tomcat5/work

2. Set up passwords

# vi /etc/tomcat5/tomcat-users.xml

  Edit like :
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="admin" password="xxxxxxx" roles="admin,manager"/>

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

 



Main menu 2

Story | by Dr. Radut