In linux, configure multiple tomcat instances-Linux Enterprise Application-Linux server application information. For more information, see. You can customize Tomcat instances in linux. If multiple developers need to share the installed tomcat, but they need their own unique instances, it is very useful. To achieve this, you need to set CATALINA_BASE.
Export CATALINA_BASE = $ HOME/tomcat
If the environment does not exist, CATALINA_BASE is automatically set as CATALINA_HOME.
Below, you need to create a Tomcat directory in the main directory and create or copy a specific directory, as shown below:
Cd $ HOME
Md tomcat
Cd tomcat
Cp $ CATALINA_HOME/conf.
Md logs
Md webapps
Md work
Md temp
If you want to copy the contents of the tomcat webapps directory, you can copy them to the new webapps directory.
Modify the conf/server. xml file and replace the following ports to avoid conflict. If you configure Tomcat as the listening port 8009 of Apache, you can comment this element in the server. xml file to disable this connector.
Other ports that may need to be modified:
8080 default connection Port
8443 SSL connection Port
8009 listener port of Apache
8005 port used to stop Tomcat
After modification, you can use the common startup. sh and shutdown. sh scripts in the CATALINA_HOME/bin directory to start and stop Tomcat.
At this time, because the File Permission is set for your users, do not use tomcat users.
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