How to Install Tomcat 8 in CentOS 6/7

Download tomcat tar file
# wget wget

Extract file
# tar -zvxf apache-tomcat-8.5.15.tar.gz
# cd apache-tomcat-8.5.15

Set home path of Tomcat
# echo “export CATALINA_HOME=”/opt/apache-tomcat-8.5.15″” >> ~/.bashrcecho “export CATALINA_HOME=”/opt/apache-tomcat-8.5.15″” >> ~/.bashrc

Update file
# source ~/.bashrc

Start tomcat service
# cd /opt/apache-tomcat-8.5.15
# ./bin/

Now access server from below URL

Put /opt/apache-tomcat-8.5.15/bin/ script in /etc/rc.local file to auto start server on boot.

# cat /etc/rc.local
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don’t
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local

Leave a Reply

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