blog.up-link.ro android bsd linux unix & open-source world

6Apr/100

How To Install Tomcat 6 on Ubuntu

WP Greet Box icon
Hello there! If you are new here, you might want to subscribe to the RSS feed or subscribe via E-mail for updates on this topic.

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 Print This Post
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


*

No trackbacks yet.