一、下载Tomcat8压缩包
打开tomcat8的下载页面 http://tomcat.apache.org/download-80.cgi
二、解压以及重命名
[root@localhost ~]# tar -zxvf apache-tomcat-8.5.16.tar.gz
[root@localhost ~]# mv apache-tomcat-8.5.16/ /usr/local/tomcat/
[root@localhost ~]# cd /usr/local/tomcat/
三、配置tomcat server.xml
配置端口,编码以及配置项目,这里就配置一个端口,把默认的8080,修改成80
[root@localhost tomcat]# vi conf/server.xml
四、配置防火墙,开放80端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
五、启动tomcat
[root@localhost ~]# /usr/local/tomcat/bin/startup.sh
Using CATALINA_BASE: /usr/local/tomcat/
Using CATALINA_HOME: /usr/local/tomcat/
Using CATALINA_TMPDIR: /usr/local/tomcat//temp
Using JRE_HOME: /home/java/jdk1.8.0_131
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
启动成功
六、测试
浏览器访问:http://172.17.1.220