When modifying the port number where the tomcat, linux system needs to be modified

I've got several tomcat, then we should use to change the port number is not the same:

1, first cd into the directory of tomcat conf folder, vi open server.xml configuration file

[root@localhost soft]# ls
download  redis            solrhome  tomcat-sina-8081  tomcat-souhu-8082
jdk       redis-3.0.0.gem  tomcat    tomcat-solr       zookeeper-3.4.6
[root@localhost soft]# cd tomcat-solr/
[root@localhost tomcat-solr]# cd conf/
[root@localhost conf]# ls
Catalina         catalina.properties  logging.properties  tomcat-users.xml
catalina.policy  context.xml          server.xml          web.xml
[root@localhost conf]# vim server.xml
2 , change one
8005 changed to 8885

<Server port="8885" shutdown="SHUTDOWN">
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />

3, change bis

8080 changed to 8888

<Connector port="8888" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

4, changes ter

8009 changed to 8889

<!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8889" protocol="AJP/1.3" redirectPort="8443" />

5, wq save and exit

Finally, in the bin directory tomcat start of ./startup.sh about to try: OK

 

Guess you like

Origin www.cnblogs.com/qingmuchuanqi48/p/12398656.html