Friday, May 18, 2012

How to install Tomcat in Ubuntu ?

1) Find a correct tomcat package to install

sudo apt-cache search tomcat

2) For example, if you find tomcat6 in the output of above command, Install all Tomcat packages with following commands

sudo apt-get install tomcat6-webapps
sudo apt-get install tomcat6-admin
sudo apt-get install tomcat6

3) In order to start your Apache tomcat server, first install java i.e both JRE and JDK. To install JRE, go with this link.

4) But in order to start you need JDK too. Just open synaptic manager and search for oracle-jdk7-installer if you've followed above link to install JRE on your machine.

5) Start your Apache tomcat by using the following command

/etc/init.d/tomcat6 start

6) If you want t stop,

execute /etc/init.d/tomcat5.5 stop
if you want to restart the service

execute /etc/init.d/tomcat5.5 restart

If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

No comments:
Write comments