[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]# iptables -F
[root@localhost ~]# rpm -qa |grep -i openjdk
java-11-openjdk-headless-11.0.ea.28-7.el7.x86_64
java-11-openjdk-11.0.ea.28-7.el7.x86_64
[root@localhost ~]# rpm -e java-11-openjdk-11.0.ea.28-7.el7.x86_64
rpm -e java-11-openjdk-headless-11.0.ea.28-7.el7.x86_64 --nodeps ##--nodeps解除依赖包的安装
[root@localhost ~]# tar xf jdk-8u191-linux-x64.tar.gz
[root@localhost ~]# mv jdk1.8.0_191/ /usr/local/java
[root@localhost ~]# /usr/local/java/bin/java -version
cat /etc/profile
export JAVA=/usr/local/java
export PATH=$PATH:$JAVA/bin
[root@localhost ~]# source /etc/profile
[root@localhost ~]# tar xf apache-tomcat-8.5.40.tar.gz
[root@localhost ~]# mv apache-tomcat-8.5.40 /usr/local/tomcat8
[root@localhost ~]# /usr/local/tomcat8/bin/startup.sh
[root@localhost ~]# netstat -anpt |grep 8080