create tomcat instance in linux using one tomcat as a base

This is configuring the tomcats :

  1. making one tomcat into base and run remaining instances

CATALINA_BASE=/home/stp/tomcat8080 /usr/apache-tomcat-6.0.20/bin/catalina.sh start

tail -f tomcat8080/logs/catalina.out

COPY FILE FROM CONF

cp /usr/apache-tomcat-6.0.20/conf/* tomcat8080/conf/

TO EDIT THE SERVER.XML IN TOMCATS

for i in 1 2; do sed -e s/8080/808$i/g -e s/8005/$((8005+$i*100))/g -e s/8009/$((8009+$i*100))/g conf/server.xml > tomcat808$i/conf/server.xml ; done

CREATE TOMCAT INSTANCES

for i in 1 2; do cp -r tomcat8080 tomcat808$i; done

TO COPY THE CONF FILE INTO TOMCATS

cp tomcat8080/conf/server.xml conf/

Comments

Popular posts from this blog

Spring MVC with Sqlite sample

Struts Tutorial Page