How to change the tomcat port number in Linux

How to change the tomcat port number in Linux

I have several tomcats here. If I use them at the same time, I need to change the port numbers to different ones:

1. First, cd into the conf folder in the tomcat directory and open the server.xml configuration file with vi

[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 1

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 2

8080 changed to 8888

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

4. Change 3

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, try starting it in the bin directory of tomcat: ./startup.sh: OK

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Various problems and solutions in the process of deploying Tomcat to release projects on Linux
  • Linux (center OS7) installs JDK, tomcat, mysql to build a java web project running environment
  • Detailed graphic tutorial on installing and uninstalling Tomcat8 on Linux
  • Steps to monitor Tomcat status and start it automatically using shell scripts under Linux
  • Install tomcat and deploy the website under Linux (recommended)
  • Linux (CentOS7) installs Tomcat and sets Tomcat as a startup item (taking tomcat8 as an example)
  • Install three or more tomcats under Linux system (detailed steps)
  • How to start and stop Tomcat service by writing shell script in Linux environment

<<:  Detailed explanation of mysql integrity constraints example

>>:  Native JS to implement paging click control

Recommend

Detailed explanation of several solutions for JavaScript interruption requests

Table of contents 1 Promise Interrupt the call ch...

mysql installer community 8.0.12.0 installation graphic tutorial

This tutorial shares the installation of mysql in...

Introduction to the use of common Dockerfile commands

Table of contents 01 CMD 02 ENTRYPOINT 03 WORKDIR...

Example code for mixing float and margin in CSS

In my recent studies, I found some layout exercis...

mysql8.0.23 msi installation super detailed tutorial

1. Download and install MySql Download MySql data...

Detailed explanation of downloading, installing and using nginx server

download http://nginx.org/en/download.html Unzip ...

Detailed process of modifying hostname after Docker creates a container

There is a medicine for regret in the world, as l...

About 3 common packages of rem adaptation

Preface I wrote an article about rem adaptation b...

Summary of various methods for JS data type detection

Table of contents background What are the methods...

Mobile development tutorial: Summary of pixel display issues

Preface I believe that in the process of mobile t...

Docker connects to the host Mysql operation

Today, the company project needs to configure doc...

How to configure the My.ini file when installing MySQL5.6.17 database

I recently used the MySql database when developin...

How to remove the blue box that appears when the image is used as a hyperlink

I recently used Dreamweaver to make a product pres...

Detailed explanation of the use cases of Vue listeners

The first one is to use jQuery's ajax to send...

Use a few interview questions to look at the JavaScript execution mechanism

Table of contents Previous words Synchronous and ...