Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stdekker/b125ef8999e11b9cfaa3 to your computer and use it in GitHub Desktop.
Save stdekker/b125ef8999e11b9cfaa3 to your computer and use it in GitHub Desktop.

Setting up Solr for Drupal on Debian 7.5

Most from: http://pacoup.com/2014/02/05/install-solr-4-6-with-tomcat-7-on-debian-7

Install java

$ apt-get install openjdk-7-jre-headless

Install tomcat7

$ apt-get install tomcat7 tomcat7-admin

Tomcat installs on port 8080 by default.

Configure Tomcat manager (and user)

$ nano /etc/tomcat7/tomcat-users.xml

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="your_username" password="your_password" roles="manager-gui,admin-gui"/>

$ service tomcat7 restart

Download Solr 4.2.1

Use your home or a temporary directory

$ cd ~ $ wget http://archive.apache.org/dist/lucene/solr/4.2.1/solr-4.2.1.tgz $ tar -xzvf solr-4.2.1.tgz

Set up Solr

$ cp ~/solr-4.2.1/example/lib/* /usr/share/tomcat7/lib/

Create the Solr webapp

cp ~/solr-4.2.1/dist/solr-4.2.1.war /var/lib/tomcat7/webapps/solr-4.2.1.war

Create solr.xml

$ cd /var/lib/tomcat7/conf/Catalina/localhost/ $ vi solr.xml

--

--

Create a custom core

Copy Drupal conf to Solr

cp /var/www/spnl/build/profiles/sp/modules/contrib/apachesolr/solr-conf/solr-4.x/* /var/lib/tomcat7/solr-4.2.1/sp-production/conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment