Set up Tomcat web server in Linux

26Feb09

To setup Apache Tomcat in Linux do the following

1- Download Tomcat latest version from here

http://tomcat.apache.org/download-60.cgi

On the left panel under ‘Download’ heading, click on your required tomcat version.

select tar.gz (pgp, md5) under  ‘Core’ and  ‘Binary Distribution’ headings.

2- Extract tar at an appropriate place. For example /home/tomcat_home

3- Set Tomcat environment variables

In windows

Right click My Computer> Properties > Advance >Environment Variables > under User variables > New and set CATALINA_HOME to the java home directory.

In Linux

Go to /home/your_home_directory then show the hidden files (View/ Show Hidden Files). Find and open .bashrc file.

Go to the end of the file and insert the following lines.

export CATALINA_HOME=/home/tomcat_home/

export PATH=$PATH:/home/tomcat_home/bin

4- Keep in mind that your JAVA_HOME environment variable must also be set.

You can check whether JAVA_HOME is set or not, type following in terminal

java -version

If it does not return the java version then your JAVA_HOME is not set.

To set JAVA_HOME, insert the following lines ( java installation paths may vary on your machine)

export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.16
export PATH=$PATH:/usr/lib/jvm/java-1.5.0-sun-1.5.0.16/bin

4- Open Terminal and type

startup.sh

press Enter and you tomcat is now running 🙂

Related Topics

You may not see tomcat console out in Linux like the way you see in windows. To do so view the following tutorial
How to view Tomcat output on console in Linux

~*~ Technology is good ~*~

Advertisements


No Responses Yet to “Set up Tomcat web server in Linux”

  1. Leave a Comment

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: