Install Apache Solr 4.7.1 on Ubuntu
Posted by Marius Voila on April 07, 2014 in London, U.K . — 0 comments This post contains 391 wordsSo the task of the day was to install latest version of Solr (4.7.1) and to be sincere I was struggling a bit due to the fact that there is no .deb or repository from where you can install it out of the box. After finishing the installation I decided to write this article just in case some other people will have the same “challenge” and not to forget :-) (planing to write a ansible playbook with this).
Here we go with the steps which you need to follow so you can get it working:
- We install Apache Tomcat7 which is easy because we find it in the repo:
apt-get install -y tomcat7 tomcat7-admin tomcat7-common
- We download and configure the Solr instance:
- We configure context in tomcat pointing to our Solr files:
vim /etc/tomcat7/Catalina/localhost/solr.xml
and add this:
- Now edit
/opt/solr/$Name_Of_Your_Project/multicore/solr.xml
and change to look like this:
If you don’t do this, all changes (cores creations) made in the SOLR web admin interface will be lost when you restart tomcat.
- Giving Tomcat permissions to the Solr directory and restart tomcat :
Now as an extra because I had to configure this for a Drupal project I had to configure Solr for it but this is fairly easy :-) . We download the config files
wget http://ftp.drupal.org/files/projects/search_api_solr-7.x-1.4.zip
Unzip them and replace the configs with the ones recommended by Drupal :