标签:执行 编辑 span export .gz man 当前目录 rc.d ane
#下载tomcat压缩包到/usr/local/tomcat/,并解压到当前目录
mkdir -p /usr/local/tomcat
cd /usr/local/tomcat
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-9/v9.0.12/bin/apache-tomcat-9.0.12.tar.gz
tar -zxvf apache-tomcat-9.0.12.tar.gz
#编辑startup.sh
cd /usr/local/tomcat/apache-tomcat-9.0.12/bin
mv startup.sh startup.sh.bak
vi startup.sh
## FOR TOMCAT ##
export JAVA_HOME=/usr/local/java/jdk-9.0.4/
export CLASSPATH=.:${JAVA_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-9.0.12
/usr/local/tomcat/apache-tomcat-9.0.12/bin/catalina.sh start
#给startup.sh执行权限
chmod +x startup.sh
#开机自动启动startup.sh
vi /etc/rc.d/rc.local
## TOMCAT STARTUP ##
/usr/local/tomcat/apache-tomcat-9.0.12/bin/startup.sh
#放通相关的业务端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
标签:执行 编辑 span export .gz man 当前目录 rc.d ane
原文地址:https://www.cnblogs.com/heqiuyong/p/9739999.html