安装TOMCAT
配置环境
- 操作系统 centos6.9
- 内存 2.5G
- 存储 250G
环境初始化
iptables -F
vim /etc/selinux/config
cat /etc/selinux/config
SELINUX=disabled
getenforce-->disabled
/etc/init.d/iptables stop
chkconfig iptables off
配置jdk
清理历史版本jdk
rpm -qa | grep jdk
yum remove $JDK_VERISON -y
安装jdk
tar xf jdk-8u144-linux-x64.tar.gz -C /usr/java/
cd /usr/java
ln -sv jdk1.8.0_144 latest
vim /etc/profile.d/java.sh
. /etc/profile.d/java.sh
cat /etc/profile.d/java.sh
export JAVA_HOME=/usr/java/latest
export PATH=$JAVA_HOME/bin:$PATH
配置tomcat
tar xf apache-tomcat-8.5.20.tar.gz -C /usr/local/
cd /usr/local
ln -sv apache-tomcat-8.5.20 tomcat
vim /etc/profile.d/catalina.sh
. /etc/profile.d/catalina.sh
cat /etc/profile.d/catalina.sh
export CATALINA_HOME=/usr/local/tomcat
export PATH=$PATH/bin:$PATH
启动tomcat
cd /usr/local/tomcat/bin
./catalina.sh configtest
./catalina.sh start
查看端口
ss -tnlp | grep 8080