Home / ENGLISH / Linux System / How to install tomcat 7/8 on Centos and Redhat 6/7

How to install tomcat 7/8 on Centos and Redhat 6/7

Linux – How to install tomcat 7/8 on Centos  and Redhat 6/7

[Solved] How to install tomcat 7/8 on Centos  and Redhat 6/7

 

Apache Tomcat is a opensource webserver product of Apache Foundation like Apache HTTP server. It is used to deploying Java Servlet and JSP applications. To deploy any application in Tomcat we can simply create a war file and deploy them. For more details about you can visit apache official site http://tomcat.apache.org/ .

This article will help you to install tomcat 7 on Ubuntu, Debian and LinuxMint systems.

Step 1: Verify JAVA

First, we need to make sure that we have installed java on or system. JAVA is the first requirement of tomcat installation. Use the following command to check if you have java installed already on your system. Try to keep java up to date with the latest version.

In case you do not have java installed use link:

[Solved] How to install Java 7 on Centos and Redhat 6/7

Step 2: Download Tomcat 7 Archive

After configuring JAVA properly on your system, let’s download Apache tomcat archive file from Apache official site using http://tomcat.apache.org/download-70.cgi or use the following command to download Tomcat 7.0.68 from Apache server.

After competed download extract archive file in /opt directory. You may change this location as per your setup.

Step 3: Setup Environment Variable

Before starting Tomcat, Configure environment variables by adding an entry in the ~/.bashrc file, So that system environment can set on system bootup with the following command.

Step 4: Start Tomcat

After completing all above configuration, Let’s use below command to start Tomcat. There are no need to compile its source. Tomcat by default start on port 8080, So make sure no other application using the same port.

Step 5: Access Tomcat

Tomcat server works on port 8080 default. Access tomcat on a web browser by connecting your server on port 8080.

Step 6: Create Tomcat7 Init Script

Create a init file /etc/init.d/tomcat7 using following content.

Now execute following commands to set proper permissions and symbolic links for init script.

About Hoang Do Viet

Tớ thích thể thao, văn thơ, ghét IT như quỷ ý ......

Check Also

How to fix error PYCURL ERROR 7 – Failed to connect to .. on Vmware Workstation Centos

Tuhocmang.com – [Discuss]: How to fix error PYCURL ERROR 7 – “Failed to connect to ..” …

Leave a Reply

Your email address will not be published. Required fields are marked *