hellopasswdjava
[root@localhost ~]# vi /usr/local/tomcat/conf/server.xml /8080 修改 69 <Connector port="8080" protocol="HTTP/1.1"
爲web
[root@localhost ~]# vi /usr/local/tomcat/conf/server.xml 69 <Connector port="80" protocol="HTTP/1.1"
[root@localhost ~]# /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@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: /usr/local/jdk1.8 Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar Tomcat started.
[root@localhost ~]# netstat -lntp | grep java tcp6 0 0 127.0.0.1:8005 :::* LISTEN 13245/java tcp6 0 0 :::8009 :::* LISTEN 13245/java tcp6 0 0 :::80 :::* LISTEN 13245/java [root@localhost ~]# ps aux | grep java root 13245 9.4 4.8 3529000 90316 pts/2 Sl 22:50 0:03 /usr/local/jdk1.8/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dignore.endorsed.dirs= -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djav.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start root 13297 0.0 0.0 112640 980 pts/2 S+ 22:51 0:00 grep --color=auto java
若沒有顯示80端口,則要注意,80端口是否被其餘服務佔用apache
Windows訪問瀏覽器http://192.168.9.128/,默認訪問80端口,顯示tomcat的頁面則表示更改端口成功bootstrap
修改於 180120瀏覽器