Integrating sunspot solr in rails with tomcat7
At a first glance it seems too easy to integrate a gem in rails but when it comes to Tomcat7 and java dependencies it always end up in tricky part so here it is follow these simple steps to integrate solr with all it's dependencies. first you need to have java environment sudo apt-get -y install openjdk-7-jdk sudo mkdir /usr/java sudo ln -s /usr/lib/jvm/java-7-openjdk-amd64 /usr/java/default Install tomcat sudo apt - get install tomcat7 sudo apt - get install tomcat7 - admin Then download solr (check for a newer version if you want) sudo wget http : //archive.apache.org/dist/lucene/solr/4.8.1/solr-4.8.1.tgz sudo tar - xvf solr - 4.8 . 1.tgz sudo cp - R solr - 4.8 . 1 / example / / opt / solr Set Solr with Tomcat: sudo cp - R / opt / solr / lib / ext /* /usr/share/tomcat7/lib/ sudo cp /opt/solr/webapps/solr.war /var/lib/tomcat7/webapps/solr.war sudo cp -R /opt/solr /var/lib/tomcat7 sudo chown -R tomcat7:tomcat7 /var/lib/tomcat7/solr service tomcat7 restart i