Search Suggest

How to Install Tomcat 8.5.15 in CentOS/RHEL 6/7

Download tomcat tar package

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

Set environment variable
# 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/
Using CATALINA_BASE:   /opt/apache-tomcat-8.5.15
Using CATALINA_HOME:   /opt/apache-tomcat-8.5.15
Using CATALINA_TMPDIR: /opt/apache-tomcat-8.5.15/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /opt/apache-tomcat-8.5.15/bin/bootstrap.jar:/opt/apache-tomcat-8.5.15/bin/tomcat-juli.jar
Tomcat started.

Now access server from below URL

Put /opt/apache-tomcat-8.5.15/bin/startup.shscript 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

Đăng nhận xét