How To Install Tomcat 6 on Ubuntu
Apache Tomcat is a servlet container developed by the Apache Software Foundation. Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a "pure Java" HTTP web server environment for Java code to run.
1. Install required packages
# sudo apt-get install tomcat6 tomcat6-admin tomcat6-examples
Tomcat depends on a lot of other packages and the package manager will take care of that.
2. Check the services
Make sure the service is responding by entering the following url in a browser:
http://ipaddress:8080/
Replace ipaddress with the ip address of your server
3. Create user and roles for the manager application
Replace the contents of /etc/tomcat6/tomcat-users.xml with something like this:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager" />
<role rolename="tomcat"/>
<user username="your_username" password="your_password" roles="tomcat,manager"/>
</tomcat-users>
Replace "your_username" and "your_password" with credentials of your choice.
4. Restarting Tomcat and enable auto startup
Restarting Tomcat with the following command:
# sudo service tomcat6 restart
Enable auto startup:
# sudo update-rc.d tomcat6 defaults
5. Enter the manager application with a browser
http://ipaddress:8080/manager/html
Replace ipaddress with the ip address of your server
You can browse the examples using the following location:
http://ipaddress:8080/examples
Print This Post