How to Install Tomcat 8 on CentOS/RHEL 5/6/7

Apache Tomcat is an opensource webserver result of Apache Foundation like Apache HTTP server. It is accustomed to conveying Java Servlet and JSP applications. To convey any application in Tomcat we can essentially make a war record and send them.


Step 1: Check Java Version
JAVA is the first necessity for Tomcat 8 establishment. Verify you have JAVA SE 6 or Later form introduced in your framework. Utilization taking after summon to check in the event that you have java introduced as of now on your framework.

# java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
If you do not have java installed, Use any article Install Java 7 or Install Java 8 in RHEL based systems.

Install Java 8 on CentOS
Install Java 7 on CentOS

Step 2: Downloading Tomcat 8 Archive
Download Apache Tomcat document record from Apache tomcat authority download page. You can use beneath wget order to download it.

# cd /tmp
# wget

After competed download extract archive file and move it.

# tar xzf apache-tomcat-8.5.0.tar.gz
# mv apache-tomcat-8.5.0 /usr/local/apache2/tomcat8

Step 3: Starting Tomcat
Tomcat is very easy to use. You simple extract the document and begin the tomcat server. Tomcat of course begin on port 8080, Make beyond any doubt no different administrations are running on same port utilizing ‘telnet localhost 8080’.

# cd /usr/local/apache2/tomcat8
# ./bin/

Sample Output

Using CATALINA_BASE:   /usr/local/tomcat8
Using CATALINA_HOME:   /usr/local/tomcat8
Using CATALINA_TMPDIR: /usr/local/tomcat8/temp
Using JRE_HOME:        /opt/jdk1.8.0_31
Using CLASSPATH:       /usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar

Tomcat started.

Step 4: Access Tomcat in Browser
Tomcat server works at port 8080 default. To get to Tomcat on web program by joining your server on port 8080. 

Step 5: Setup User Accounts
At last we have to make client records to secure and access administrator/supervisor pages. Edit conf/tomcat-users.xml record in your editor and paste inside labels.

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="techoism" password="_SECRET_PASSWORD_" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />

Step 6: Stop Tomcat
At last on the off chance that you feel that there are no need of Tomcat in your framework, You can just stop it utilizing underneath order from tomcat home catalog.

# ./bin/

Enjoy it!

No Responses

Leave a Reply

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.