> CentOS > CentOS教程 >

CentOS-6.4拷贝Tomcat7形成集群

1、拷贝第二份:

cd /usr/local
cp -r tomcat1 tomcat2

cd /usr/local/tomcat2/conf
vi server.xml

8005改成9005

8080 改成9080

8009改成9009

2、修改catalina.sh

#!/bin/sh

export TOMCAT_HOME=/usr/local/tomcat2
export CATALINA_HOME=/usr/local/tomcat2

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
export LD_LIBRARY_PATH

 

3、第二个TOMCAT设置为自启动

echo "/usr/local/tomcat2/bin/startup.sh" >>/etc/rc.d/rc.local  
 


(责任编辑:IT)