Deploy multiple tomcats on the same Centos

   In our daily work, we often have systems that deploy multiple application nodes. We can use weblogic server or tomcat server for deployment (of course there are others). I use centos7 and tomcat7 here. Why am I deploying multiple tomcats on a centos here? The main reason is that the server performance is better. It would be a waste to deploy an application node. This article is just a brief summary of the installation and deployment of tomcat. As for how multiple tomcat servers perform reverse proxying and load balancing through nginx, and tomcat optimization, please see my follow-up articles on nginx and tomcat.

 

The specific installation and deployment steps are as follows:

 

  1. To download and install the resource file, you can use the wget command, or you can download it directly from the Windows computer and upload it to the Linux server .



      

     

  2. Unzip the tomcat installation package



      

     

  3. Copy multiple tomcat decompressed files, I have 2 here , with different names



      



      

  4. Modify tomcat ports, mainly shutdown , ajp , http ports, as long as all tomcat ports are inconsistent, because I use one machine to deploy multiple tomcats here , if there are conflicts, there will be problems

     

  5. Create your own folder zx under webapps , and then add your own home page index.jsp in it, the content can be determined by yourself, here is the online content for direct reference



     

      



      

     

  6. Start multiple tomcats separately to see if they are   normal./startup.sh



      

     

  7. View startup via web access



      



      

     

 

   In our daily work, we often have systems that deploy multiple application nodes. We can use weblogic server or tomcat server for deployment (of course there are others). I use centos7 and tomcat7 here. Why am I deploying multiple tomcats on a centos here? The main reason is that the server performance is better. It would be a waste to deploy an application node. This article is just a brief summary of the installation and deployment of tomcat. As for how multiple tomcat servers perform reverse proxying and load balancing through nginx, and tomcat optimization, please see my follow-up articles on nginx and tomcat.   The specific installation and deployment steps are as follows:  
  1. To download and install the resource file, you can use the wget command, or you can download it directly from the Windows computer and upload it to the Linux server .



      

     

  2. Unzip the tomcat installation package



      

     

  3. Copy multiple tomcat decompressed files, I have 2 here , with different names



      



      

  4. 修改tomcat端口,主要是shutdownajphttp端口,只要保证所有tomcat端口不一致就行了,因为我这里采用的是一台机器部署多个tomcat,如果有冲突就会有问题

     

  5. webapps下新建自己的文件夹zx,然后分别在里面添加自己的主页index.jsp,内容可以自己定,我这里是直接参考的网上内容



     

      



      

     

  6. 分别启动多个tomcat查看是否正常  ./startup.sh



      

     

  7. 通过web访问查看启动



      



      

     

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326391090&siteId=291194637