Solr is a search platform which is built on Apache Lucene. It makes search easier and faster. Solr can be installed along with tomcat or jetty. This post explains the installation based on jetty.
First you should install java and jetty as mentioned in the link here.
We will install solr also in /opt. First download the latest version of solr from https://archive.apache.org/dist/lucene/solr/
I am going to download version 4.10.4. Once downloaded, uncompress it and copy the war file from dist directory to jetty webapps folder.
Now, a few more files need to be copied from the uncompressed solr-4.10.4 folder. Follow the steps below.
Now open the file /etc/default/jetty and add the following line to it.
NExt open the file /opt/solr/collection1/conf/solrconfig.xml and make sure that the path to dist and contrib folders are set correct in it.
For example the following line needs to modified
Similarly modify all lib dir which are incorrect in path. Also comment out the ones which does not exist.
Now, correct the permission of all solr files to be owned by jetty and restart jetty.
Now you can access the solr admin console using the link http://localhost:8080/solr or from browser using http://184.108.40.206:8080/solr where 220.127.116.11 is your server’s IP Address. Make sure to whitelist the post 8080 in your firewall.