Skip to content

Instantly share code, notes, and snippets.

@rcrowley
Created May 24, 2009 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcrowley/117167 to your computer and use it in GitHub Desktop.
Save rcrowley/117167 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Haystack/Solr setup
# On a Mac you've already got Java but on Ubuntu, you need it
if [ -z "$(uname -a | grep Darwin)" ] ; then
sudo apt-get install --no-install-recommends sun-java6-jre
fi
WD=$(pwd)
cd /tmp/
svn checkout http://pysolr.googlecode.com/svn/trunk/ pysolr
git clone git://github.com/toastdriven/pysolr.git pysolr-git
cp pysolr-git/pysolr.py pysolr/
cd pysolr
sudo python setup.py install
cd .. ; sudo rm -rf pysolr*
git clone git://github.com/toastdriven/django-haystack.git haystack
cd haystack
sudo python setup.py install
cd .. ; sudo rm -rf haystack
# Now put Solr wherever you want it. I'm no expert so I'm still running a
# supervised Jetty process out of the apache-solr-1.3.0/example directory.
# If you do this, too, don't forget to alter etc/jetty.xml to only listen
# on 127.0.0.1, by adding this in the <Call name="addConnector"> ...
# <New class="org.mortbay.jetty.bio.SocketConnector"> section:
# <Set name="host"><SystemProperty name="jetty.host"
# default="127.0.0.1" /></Set>
cd $WD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment