Installing and Configuring Solr on Debian GNU/Linux
After installing and playing around with Solr on my Gentoo box, I had to deploy the same stuff on Debian Lenny/sid.
The difference between the two distros wasn't huge but it worth mentioning that Tomcat 6 didn't hit Debian's experimental until the moment I am typing this.
The installation of Tomcat 5.5 and Solr 1.2 from APT is as easy as:
# apt-get install solr-tomcat5.5
The problem for me is: Tomcat 5.5 is way old and caused me few issues with relatively bug updates to Solr. So I wanted to install Tomcat 6 which will be done with these steps:
# cd
# apt-get install sun-java6-jdk
# wget http://apache.osuosl.org/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.1...
# tar zxf apache-tomcat-6.0.18.tar.gz
# mv apache-tomcat-6.0.18 /opt/tomcat6
# echo "export CATALINA_BASE=/opt/tomcat6" >> /etc/bash.bashrc
# echo "export CATALINA_HOME=/opt/tomcat6" >> /etc/bash.bashrc
# echo "export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre;" >> /etc/bash.bashrc
# echo "export PATH=${JAVA_HOME}/bin:${PATH};" >> /etc/bash.bashrc
# source /etc/bash.bashrc
Tomcat 6 is ready. Now it's time to install Solr. I will install the latest 1.3 with the following steps:
# wget http://apache.osuosl.org/lucene/solr/1.3.0/apache-solr-1.3.0.tgz
# tar zxf apache-solr-1.3.0.tgz
# cp apache-solr-1.3.0/dist/apache-solr-1.3.0.war /opt/tomcat6/webapps/solr.war
# cp -r apache-solr-1.3.0/example/solr /opt/solr
# echo "export JAVA_OPTS="$JAVA_OPTS -D/opt/solr;" >> /etc/bash.bashrc
Testing our configuration:
# /opt/tomcat6/startup.sh
Using CATALINA_BASE: /opt/tomcat6
Using CATALINA_HOME: /opt/tomcat6
Using CATALINA_TMPDIR: /opt/tomcat6/temp
Using JRE_HOME: usr/lib/jvm/java-6-sun/jre/bin/java
This means that you have Tomcat up and running on the port specified at /opt/tomcat6/conf/server.xml.
Thanks for Kenno for his very helpful article about Tomcat 6 on Debian.
About Me

cp apache-solr-1.3.0/example/solr /opt/solrshould becp -r apache-solr-1.3.0/example/solr /opt/solr