Home>Article>Operation and Maintenance> How to modify tomcat port number in linux
Method: 1. Use the vim command to enter and edit the "server.xml" file. The syntax is "vim/installation path/tomcat full name/conf/server.xml"; 2. Enter "/8080" at the bottom Find the specified port number and modify it; 3. After the modification is completed, enter ":wq" to save and exit.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How to modify the tomcat port number in Linux
Step 1: Enter the edit (server.xml) file
Method 1: Go directly from the root directory (server.xml) to modify the port number (one step)
vim /Installation path/tomcat full name/conf/server.xml
Method 2: First switch to the folder where the configuration is stored ( tomcat/conf ), and then ( vim server.xml ) edit the port number configuration file
##conf : The directory is mainly used to store some configuration files of tomcat server.xml : You can set the port number, set the domain name or IP, the default loaded project, and request the encoding Step 2: Modify the Tomcat port No. Enter /8080 at the bottom and find the following port (can be modified to the port number you specify, 80/8089, etc., the default is 8080) After modifying the underlying command input: wq save and exit The modified successful test access is as shown below:##Related recommendations: "
Linux Video TutorialThe above is the detailed content of How to modify tomcat port number in linux. For more information, please follow other related articles on the PHP Chinese website!