解压:
tar -xzvf apache-tomcat-8.5.23.tar.gz -C /usr/local/java
配置Tomcat的环境变量:
export CATALINA_HOME=/usr/local/java/apache-tomcat-8.5.23
source /etc/profile
将Tomcat配置为服务:
cp /usr/local/java/apache-tomcat-8.5.23/bin/catalina.sh /etc/init.d/tomcat8
chmod 755 /etc/init.d/tomcat8
vi /etc/init.d/tomcat8
#chkconfig:
#description: tomcat8 service export JAVA_HOME=/usr/local/java/jdk1..0_151
export CATALINA_HOME=/usr/local/java/apache-tomcat-8.5.
chkconfig --add tomcat8
启动关闭:
service tomcat8 start
service tomcat8 stop
查看状态:
service tomcat8 status