How To Install Apache Tomcat 8 on CentOS 7

1.Install JAVA

#yum install java-1.7.0-openjdk-devel

2.Install tomcat

We are going to install Tomcat in  /usr/local

#cd /usr/local


#tar zxvf apache-tomcat-8.5.9.tar.gz

3.  Start tomcat

#cd /usr/local/apache-tomcat-8.5.9/bin


4. Check the Tomcat web UI with http://server_IP_address:8080

5. Configure Tomcat Web Management Interface by adding the user as below

Open the conf file

#vi /usr/local/apache-tomcat/conf/tomcat-users.xml

add the below entry between <tomcat-users> </tomcat-users>
<user username=”admin” password=”password” roles=”manager-gui,admin-gui”/>

6. Remove Web UI restriction

By default, newer versions of Tomcat restrict access to the Manager. Open the file  /usr/local/apache-tomcat-8.5.9/webapps/manager/META-INF/context.xml and comment the section as below

<Context antiResourceLocking=”false” privileged=”true” >
<!–<Valve className=”org.apache.catalina.valves.RemoteAddrValve”
allow=”127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1″ />–>


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s