Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Installing Multicore Solr 1.3.0 / Tomcat 6.0.X on Ubuntu 8.10
Install OpenJDK (comes from universe)::
aptitude install openjdk-6-jre
Download Tomcat 6.X and move it in place::
tar zxvf apache-tomcat-6.0.20.tar.gz
sudo mv apache-tomcat-6.0.20 /usr/local/tomcat-6.0.20
Set up an init.d script (/etc/init.d/tomcat)::
# Tomcat auto-start
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
case $1 in
sh $TOMCAT_ROOT/bin/
sh $TOMCAT_ROOT/bin/
sh $TOMCAT_ROOT/bin/
sh $TOMCAT_ROOT/bin/
exit 0
Set permissions::
sudo chmod 755 /etc/init.d/tomcat
Hook it up to start-up::
sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat
Run Tomcat::
sudo /etc/init.d/tomcat start
Download / install Solr 1.3.0::
tar zxvf apache-solr-1.3.0.tgz
sudo cp apache-solr-1.3.0/example/webapps/solr.war /usr/local/tomcat-6.0.20/webapps/
Create solr.xml context in /usr/local/tomcat-6.0.20/conf/Catalina/localhost/::
<Context docBase="/usr/local/tomcat-6.0.20/webapps/solr.war" debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String" value="/var/solr/" override="true" />
Create the multicore stuff::
sudo mkdir /var/solr
sudo cp ~/apache-solr-1.3.0/example/multicore/solr.xml /var/solr/
Let's create a new core for a single site we want to host::
sudo mkdir /var/solr/
sudo cp -r ~/apache-solr-1.3.0/example/solr/conf /var/solr/
Edit the /var/solr/solr.xml configuration file to contain something like::
<cores adminPath="/admin/cores">
<core name="" instanceDir="" />
Restart Tomcat::
/etc/init.d/tomcat restart
Access things::
If you use haystack you'd set ``HAYSTACK_SOLR_URL`` to something like::
HAYSTACK_SOLR_URL = "http://yourserver:8080/solr/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.