For Ubuntu and most distribution, you can install Tomcat via the following commands.
apt-get install tomcat7 apt-get install tomcat7-admin apt-get install tomcat7-docs apt-get install tomcat7-examples
sudo /etc/init.d/tomcat7 restart
sudo /etc/init.d/tomcat7 stop
3. Admin console
Tomcat provides a webbased adminstration console which can be started via the following link.
The default user for the administration console of Tomcat is called admin with the admin password.
The available users can be found in the /conf/tomcat-users.xml directory of the Tomcat installation.
The user for the administrator console is not created automatically, you have to add the user entry manually to the /etc/tomcat7/tomcat-users.xml . The following listing gives an example for a user. To get more information try to login and see the resulting error message.
<role rolename="manager-gui" />
<user username="tomcat" password="s3cret" roles="manager-gui" />