A few words of thanks would be greatly appreciated.

Gentoo Linux - Installing TomCat

The application server (Tomcat) is a component of the Jakarta project, which provides server solutions based on Java technologies, but keeping it as an Open Source application .


  • To install Tomcat on Gentoo use the command:
    • emerge tomcat 
  • Once the installation is finished starting, stopping and checking the status of the server will be via the commands:
    • # /etc/init.d/tomcat-6 start 

# /etc/init.d/tomcat-6 stop # /etc/init.d/tomcat-6 restart

  • To test the server, go to page http://ip_serveur:8080/
  • Note that Tomcat uses port 8080 by default and this, from version 6.
  • TomCat is installed by default at the following directories:
  • /usr/share/tomcat-6/
  • /var/lib/tomcat-6/

To add tomcat on boot, use the command:

# rc-update add tomcat-6 default

User Administration

To add or remove users, edit the file /etc/tomcat-6/tomcat-users.xml, below is an example:

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

Server parameters

By editing the configuration file located under the directory /etc/conf.d/tomcat-6, it is possible to customize several options for implementing the server.


A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Gentoo Linux - Installing TomCat », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).