安装介质

版本:apache-tomcat-8.5.42.tar.gz
下载:https://archive.apache.org/dist/tomcat

环境准备

安装JDK

参考:《CentOS7.6-安装JDK-1.8.221

安装Tomcat

  1. cd /home/bigdata/software/
  2. wget https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.42/bin/apache-tomcat-8.5.42.tar.gz
  3. tar -zxvf apache-tomcat-8.5.42.tar.gz -C /usr/local/
  4. rm apache-tomcat-8.5.42.tar.gz

配置

  1. vi /usr/local/apache-tomcat-8.5.42/conf/server.xml

内容如下(修改):

  1. <Server port="8005" shutdown="SHUTDOWN">
  2. <Service name="Catalina">
  3. <Connector port="8081" protocol="HTTP/1.1"
  4. connectionTimeout="20000"
  5. redirectPort="8443" />
  6. </Service>
  7. </Server>

验证

  1. cd /usr/local/apache-tomcat-8.5.42/bin
  2. # 启动命令
  3. /usr/local/apache-tomcat-8.5.42/bin/startup.sh
  4. # 关闭命令
  5. /usr/local/apache-tomcat-8.5.42/bin/shutdown.sh
  6. tail -f /usr/local/apache-tomcat-8.5.42/logs/catalina.out

WebUI:http://LTSR003:8081