So, I installed tomcat6 from yum repo on CentOS 6.5.
I used
How to Run Multiple Instances of Tomcat on a Single Server which gets me most of the way there.
I created /srv/tomcat/tomcat[12] directories and ran a
Code:
for i in tomcat1 tomcat2 ; do mkdir -p /srv/tomcat/${i}/logs \
&& mkdir /srv/tomcat/${i}/webapps && mkdir /srv/tomcat/${i}/work \
&& mkdir /srv/tomcat/${i}/temp && cp -R /usr/share/tomcat6/conf/ \
/srv/tomcat/${i} ; done
I then did a
Code:
cp /etc/sysconfig/tomcat6 /etc/sysconfig/tomcat1
cp /etc/sysconfig/tomcat6 /etc/sysconfig/tomcat2
cp /etc/init.d/tomcat6 /etc/init.d/tomcat1
cp /etc/init.d/tomcat6 /etc/init.d/tomcat2
This was a little different that what
How to Run Multiple Instances of Tomcat on a Single Server said to (it shows creating symlinks).
I then edited /etc/sysconfig/tomcat[12] accordingly (tomcat[12])
Code:
CATALINA_BASE="/srv/tomcat/tomcat1"
CATALINA_PID="/var/run/tomcat1.pid"
TOMCAT_LOG="/srv/tomcat/tomcat1/logs/catalina.out"
CONNECTOR_PORT="8080"
service tomcat1 and tomcat2 both seem to be working and I have ports open says
Code:
netstat -plaunt | grep java
tcp 0 0 ::ffff:127.0.0.1:9005 :::* LISTEN 16820/java
tcp 0 0 :::8080 :::* LISTEN 17027/java
tcp 0 0 :::9009 :::* LISTEN 16820/java
tcp 0 0 :::9090 :::* LISTEN 16820/java
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN 17027/java
tcp 0 0 :::8009 :::* LISTEN 17027/java
It all looks right.
It is here that I think I have an issue:
I can't do a lynx
http://localhost:8080 or
http://127.0.0.1:8080
both give me a "Alert!: HTTP/1.1 400 Bad Request"
I believe I should be seeing a Tomcat 'homepage'?
Curious is they are both using the same tomcat6.conf in
Code:
/etc/init.d/tomcat1:TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
/etc/init.d/tomcat2:TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
So I copied /etc/tomcat6/tomcat6.conf to /etc/tomcat6/tomcat[12].conf
and edited
Code:
/etc/init.d/tomcat1:48:TOMCAT_CFG="/etc/tomcat6/tomcat1.conf"
/etc/init.d/tomcat2:48:TOMCAT_CFG="/etc/tomcat6/tomcat2.conf"
making the the same changes in each that I made in /etc/sysconfig/tomcat[12] specified at
How to Run Multiple Instances of Tomcat on a Single Server
netstat shows the ports open but still lynx fails with the same message.
The goal here is to install 2 instances of apache's solr 4.8.1. One under each tomcat instance.
I'd appreciate some assistance.
Thanks for your valuable time.