Skip to content

Instantly share code, notes, and snippets.

@sirleech
Created February 10, 2012 04:36
Show Gist options
  • Save sirleech/1786641 to your computer and use it in GitHub Desktop.
Save sirleech/1786641 to your computer and use it in GitHub Desktop.
Apache Solr for Drupal 6 Installation

References

Packages and Installation

sudo apt-get install solr-tomcat subversion
cd ~/web/ausbots
drush dl libraries
  • Install apachesolr module
drush dl apachesolr
  • Download solr-php client libraries
cd sites/all/libraries
svn export -r22 http://solr-php-client.googlecode.com/svn/trunk/ SolrPhpClient
  • Next there are a few configuration things we need to do before we enable the Apache Solr module. You need to copy schema.xml and solrconfig.xml to /etc/solr/conf/.
cd sites/all/modules/apachesolr
sudo cp solrconfig.xml /etc/solr/conf/
sudo cp schema.xml /etc/solr/conf/
  • Now we need to modify solrconfig.xml to tell to solr where to save files. You can use your editor of choice I like nano.
sudo nano /etc/solr/conf/solrconfig.xml
  • You need to set datDir to /var/lib/solr/data, like below
<!--
  CHANGE THIS TO WHATS BELOW
  <dataDir>${solr.data.dir:./solr/data}</dataDir>
-->
  <dataDir>/var/lib/solr/data</dataDir>

sudo service tomcat6 restart
$ cd /usr/share/solr/WEB-INF/lib
$ ln -s ../../../java/lucene-memory.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment