Centos7.6 method to install Tomcat-8.5.39

Here is how to install Tomcat-8.5.39 on centos7.6. The specific content is as follows:

# Turn off the firewall
systemctl stop firewalld.service
systemctl disable firewalld
setenforce 0
sed -i '/SELINUX=/ s/enforcing/disabled/'/etc/selinux/config

# linux update yum source to Aliyun source
yum install wget vim -y
# mkdir -pv /etc/yum.repos.d/bak
# mv -if/etc/yum.repos.d/* /etc/yum.repos.d/bak
# a=`cat /etc/redhat-release |awk '{print $4}'|awk -F . '{print $1}'`
# if [ $a == 6 ];then
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
# else
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# fi
# yum clean all
# yum makecache
# yum update

# essential softwares
yum install gcc gcc-c++ automake pcre pcre-devel zlib zlib-devel openssl openssl-devel tar unzip zip autoconf libtool make -y

# Install JDK
yum remove -y java*.x86_64
yum -y remove java-1.7.0-openjdk* 
yum -y remove java-1.8.0-openjdk*
yum install java-1.8.0-openjdk* -y
java -version
javac -version

# Install Tomcat
tar -xzvf /opt/soft/apache-tomcat-8.5.39.tar.gz -C /usr/local/
mv -f /usr/local/apache-tomcat-8.5.39 /usr/local/tomcat8.5.39
chmod 777 /usr/local/tomcat8.5.39/bin/*.sh
cp /opt/soft/tomcat /etc/init.d/
chmod 755 /etc/init.d/tomcat
/etc/init.d/tomcat restart
chkconfig --add tomcat
chkconfig tomcat on

Tomcat start and stop script

#! /bin/bash
# description: Tomcat7 Start Stop Restart
# processname: tomcat7
# chkconfig:2342080

CATALINA_HOME=/usr/local/tomcat8.5.39case $1in
 start)
 sh $CATALINA_HOME/bin/startup.sh
    ;;
 stop)
 ps -e|grep java|awk '{print "kill -9 "$1}'|sh
 # sh $CATALINA_HOME/bin/shutdown.sh
    ;;
 restart)
 ps -e|grep java|awk '{print "kill -9 "$1}'|sh
 sleep 3
 # sh $CATALINA_HOME/bin/shutdown.sh
 sh $CATALINA_HOME/bin/startup.sh
    ;;*)
 echo 'please use : tomcat {start | stop | restart}';;
esac
exit 0

to sum up

The above is the method for centos7.6 to install Tomcat-8.5.39 introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message, and the editor will reply to you in time. Thank you very much for your support to the ZaLou.Cn website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!

Recommended Posts

Centos7.6 method to install Tomcat-8.5.39
Centos6.5 install Tomcat
How to install Tomcat 9 on CentOS 8
CentOS 6.8 method steps to install vsftpd
CentOS7 install JDK8, tomcat8
[Graphic] How to install tomcat on centos
Centos8 uses yum to install mongodb 4.2 method
How to install and uninstall tomcat on centos
CentOS6.5 install Java 8 and Tomcat8
CentOS6.5 install Java 8 and Tomcat8
CentOS6.5 install Java 8 and Tomcat8
1.5 Install Centos7
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
How to install Memcached on CentOS 8
How to install R on CentOS 8
How to install FFmpeg on CentOS 8
How to install Virtualbox on CentOS 8
[Introduction to redis] Install redis under Centos
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install PHP7.4 in CentOS
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Jenkins on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install GCC on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on CentOS 8
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Webmin on CentOS 8
Centos6 method steps to build gitlab
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
How to install htop on CentOS 8
How to install Python on CentOS 8
How to install Elasticsearch on CentOS 8
How to install HDP2.6 in Centos7.2
How to install Postgresql on CentOS 8
How to install Wordpress on Centos
How to install htop on CentOS 8
centos7 .*tar package to install MySQL5.7
How to install TeamViewer on CentOS 8
How to install MariaDB on CentOS 8
How to install MongoDB on CentOS 7
How to install Odoo 13 on CentOS 8
How to install Apache on CentOS 8
How to install OpenCV on CentOS 8
How to install PHP on CentOS 8
Use VMware15 to install Linux (CentOS6.5)
virtualBox install centos, and build tomcat
How to install MongoDB on CentOS 8
Centos6 install Python2.7.13
How to install Android SDK in centos7
CentOS7.2 install Mysql5.7.13
CentOS install Redmine