How to Install and configure Tomact 8 Server on CentOS / RHEL/ Ubuntu

Apache-Tomcat-logoTomcat is an Opensource webserver and used for Java Servelet and JSP web applications. It is a  product of Apache Foundation. It is like Apache HTTP Server. To run Tomcat Webserver in a linux box we need to install JAVA in that machine. In this tutorial I will show you how to install and configure JAVA and Apache Tomcat in a linux box.

How to install Java :

For CentOS/ RHEL/ Fefodara Users:

Find available versions of JAVA in the repository by issuing the below command:

Then install it by issuing below command:

For Ubuntu Users:

Find available versions of JAVA in the repository by issuing the below command:

Then install it by issuing the below command:

Now verify the java installation by issuing the below command:

The out put should looks like this

After installing JAVA on the machine now we need to download Apache Tomcat.

You might get a broken link error  while downloading Tomcat by using the above mentioned URL. So Please go to the Tomcat official download page and get a valid link to download the Tomcat Server. The link is https://tomcat.apache.org/download-80.cgi

Now we are ready to configure Tomcat on the box. First extract the compressed download file and rename it as “Tomcat” by issuing the below commands:

Now we will start the tomcat webserver using the below steps:

You should get a output like below:

By default Tomcat Webserver will start on port number 8080. So access it by from your browser by using the URL http://your_server_hostname:8080/. You should see page like below image.

Tomcat-Server-Default-PageFinally we need to configure user account for admin and managers. For this we have to edit the tomcat-users.xml located at  /opt/Tomcat/conf  directory. Append the below code inside the <tomcat-users> . Please change the password “MYPASSWORD” with your password.

After setting up the username and password restart the Tomcat and then log in to the admin section. You should find a page like below image.

Tomcat-Server-Manager-PageNow deploy your Java Servelet or JSP web applications to the newly installed Tomcat Server and have fun.

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

4 thoughts on “How to Install and configure Tomact 8 Server on CentOS / RHEL/ Ubuntu

  1. Thank you very much. I was using http://bit.ly/SsKjSf and your article to install and set-up Tomcat 8 on my Ubuntu virtual server.

    Everything is working great now and I can deploy my tomcat apps on my own 🙂

    Thank you again,

    – Jess

Leave a Reply