Gentoo Linux - Installing TomCat

June 2017





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 .

Installation

  • 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'?>
<tomcat-users>
<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"/>
</tomcat-users>

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.

Related


Published by jak58. Latest update on August 14, 2010 at 07:14 AM by jak58.
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).