Centos7 tar包解压安装JDK+Tomcat9
tar -zxvf jdk-8u161-linux-x64.tar.gz
tar -zxvf apache-tomcat-9.0.31.tar.gz
配置环境变量vim /etc/profile
向文件里面追加以下内容
JAVA_HOME=/usr/local/jdk1.8.0_161
JRE_HOME=/usr/local/jdk1.8.0_161/jre
CATALINA_HOME=/usr/local/apache-tomcat-9.0.31
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$CATALINA_HOME/bin
CLASSPATH=:$JAVA_HOME/lib:$JRE_HOME/lib
export JAVA_HOME JRE_HOME PATH CLASSPATH CATALINA_HOME
source /etc/profile
立即生效
8080端口防火墙添加规则firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
强行关闭netstat -tunlp | grep 8080
kill -9 进程序号