Posted under » Ubuntu » Linux on 15 July 2010
Because Tomcat version 6 was included in Ubuntu 9.04, installing a working Tomcat server is reasonably straightforward. However, before we can start installing Tomcat itself, we must first install Java.
Install Java
apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Once it downloads the packages and begins the installation, you'll get a screen that contains the Sun Operating System Distributor License for Java and hit Enter to continue. This may seem a tricky thing to do if you are new to linux. Just press Tab to select your options and hit Enter to select.
You'll want to confirm that your system is configured properly for Sun's JRE.
java -version
Install tomcat 6 in ubuntu 9.04
sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
This command downloads and install the following packages
To start, stop, restart and get the server status
sudo /etc/init.d/tomcat6 start sudo /etc/init.d/tomcat6 stop sudo /etc/init.d/tomcat6 restart sudo /etc/init.d/tomcat6 status
After installation type http://localhost:8080. Now you should see tomcat welcome page which will be served from here
/var/lib/tomcat6/
* To enable admin web based features add the following lines to your /etc/tomcat6/tomcat-user.xml
Change tomcat server to run on port 80
You need to edit the /etc/tomcat6/server.xml file
default home page is /var/lib/tomcat6/webapps/ROOT/index.html