Home >Operation and Maintenance >Linux Operation and Maintenance >Can linux run two tomcats?
Linux can run two tomcats. Running method: 1. Use the "vim /etc/profile" command to write the environment variables, and use "source /etc/profile" to make the configuration effective; 2. Modify the "apache-tomcat-10.0.12/conf" directory server.xml" file; 3. Modify the "startup.sh" and "shutdown.sh" files in the two "tomcat/bin" directories.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How to run multiple tomcats at the same time on Linux
Download two tomcats and unzip them and start configuring tomcat Environment variables
Use the vim /etc/profile
command to start writing environment variables as shown in the figure:
Then make the configuration take effect
source /etc/profile
Modify the apache-tomcat-10.0.12/conf
directory In the server.xml file under, both tomcat files must be modified to 8001/8002, 80/81
The two pictures below are the same server file
For the first tomcat, change the Change one port to 8001 and the second port to 80
Then modify the twotomcat/bin
The startup.sh and shutdown.sh files in the directory. As shown in the figure
For the first tomcat, change the number to 1
Then you can start two tomcats at the same time
Recommended learning: Linux video tutorial
The above is the detailed content of Can linux run two tomcats?. For more information, please follow other related articles on the PHP Chinese website!