Tomcat Installation on Ubuntu

The Apache tomcat6 installation is done in below versions of Linux, Java

UBUNTU 13.4

JAVA 1.7.0_25

  •  Download apache tomcat tar file from here
  •  Unzip the tar

hduser@archana:~$ tar xzf apache-tomcat-6.0.37.tar.gz

Or

Right click on apache-tomcat-6.0.37.tar.gz and choose extract here option.

  •  Move apache-tomcat-6.0.37 to tomcat6

hduser@archana:~$sudo mv apache-tomcat-6.0.37 /usr/local/tomcat6

  •  Now Configure bashrc file

CATALINA_HOME is path of tomcat extracted folder

JAVA_HOME is path where java is installed

hduser@archana:~$gedit ~/.bashrc

      In bashrc file append the below 2 statements

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_25

export CATALINA_HOME=/usr/local/tomcat6

Save and exit out of .bashrc. You can make the changes effective by restarting the bashrc file.

hduser@archana:~$ . .bashrc

  • Once we are done with path it’s time to run (start) tomcat

Move to the bin folder

hduser@archana:~$cd /usr/local/tomcat6/bin/

  •  Start tomcat server

hduser@archana:/usr/local/tomcat6/bin$ sh startup.sh

Using CATALINA_BASE:   /usr/local/tomcat6

Using CATALINA_HOME:   /usr/local/tomcat6

Using CATALINA_TMPDIR: /usr/local/tomcat6/temp

Using JRE_HOME:        /usr/lib/jvm/jdk1.7.0_25

Using CLASSPATH:       /usr/local/tomcat6/bin/bootstrap.jar

  • Stop tomcat server

hduser@archana:/usr/local/tomcat6/bin$ sh shutdown.sh

Using CATALINA_BASE:   /usr/local/tomcat6

Using CATALINA_HOME:   /usr/local/tomcat6

Using CATALINA_TMPDIR: /usr/local/tomcat6/temp

Using JRE_HOME:        /usr/lib/jvm/jdk1.7.0_25

Using CLASSPATH:       /usr/local/tomcat6/bin/bootstrap.jar

🙂

Advertisements

2 Responses to Tomcat Installation on Ubuntu

  1. Pingback: Creating a Servlet with Eclipse and Tomcat | Big Data World

  2. Thank you for all of the effort on this blog

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: