Modify Tomcat default port under Linux __linux

Source: Internet
Author: User
Tags server port

Suppose Tomcat's directory is/usr/local/apache-tomcat/

1, open the Tomcat configuration file
#vi/usr/local/apache-tomcat/conf/server.xml

2, open the Tomcat configuration file Press/8080 Fast Search

3, modify the port, press I, the 8080 modified to 80

4, press: Wq Save and exit

5, restart Tomcat

#/var/apache-tomcat/bin/shutdown.sh

#/var/apache-tomcat/bin/startup.sh modifies the port number: By default, Tomcat's port is 8080 and uses two tomcat, so you need to modify one of the port numbers to make two work at the same time. So, how do you modify Tomcat's port number? First go to the installation directory (or extract directory) to find the text to modify the port number:
   By default, Tomcat's port is 8080, using two tomcat, then you need to modify one of the port number to make two work at the same time.
   So, how do you modify the Tomcat's port number? First to the installation directory (or extract directory) under the Conf folder, found in the Server.xml file, find   <connector port= "8080" maxthreads= "" minsparethreads= " "Maxsparethreads=" enablelookups= "false" redirectport= "8443" acceptcount= "debug=" 0 "connectiontimeout=" 20000 "
disableuploadtimeout=" true "/>  change port=" 8080 "to anything else.
   This modification can be resolved for 8080-port conflicts, but if you want to use two tomcat at the same time, this modification is incomplete because there are other ports that can conflict. We still need to continue modifying the   <connector port= "8009" enablelookups= "false" redirectport= "8443" debug= "0"
protocol= "ajp/" 1.3 "/> 8009 changed to the other.
    continues to change the <server port= "8005" shutdown= "shutdown" debug= "0" > 8005 to the other. After the above 3 changes, it should be OK. (if not, then look at some error prompts, it should be said that the port has a conflict, and then change according to the needs).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.