Centos7安装Tomcat8

一、下载Tomcat8压缩包

打开tomcat8的下载页面 http://tomcat.apache.org/download-80.cgi

Centos7安装Tomcat8

二、解压以及重命名

[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

  Centos7安装Tomcat8

四、配置防火墙,开放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

上一篇:ctrl+c关闭多线程python程序


下一篇:troubleshooting-Kerberos 鉴权异常