Connector port="8080" protocol="HTTP/1.1"修改为Connector port="80" protocol="HTTP/1.1"
[root@hf-01 ~]# vim /usr/local/tomcat/conf/server.xml
搜索 /8080
这里是控制监听端口的,将这里的 8080 改为 80
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
保存退出
[root@hf-01 ~]# /usr/local/tomcat/bin/shutdown.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk1.8
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
[root@hf-01 ~]# /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: /usr/local/jdk1.8
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
[root@hf-01 ~]#
[root@hf-01 ~]# netstat -lntp |grep java
tcp6 0 0 :::80 :::* LISTEN 3113/java
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 3113/java
tcp6 0 0 :::8009 :::* LISTEN 3113/java
[root@hf-01 ~]#