Installing Solr on ubuntu

Here is a quick dirty post on installing SOLR on your box. Hope its helpful.

Download SOLR

Get new Solr copy. I got my copy from Download a version you are interested in. Preferrably the latest version.
– extract out solr
– copy /examples contents to – /opt/solr
– check for another solr dir inside the examples dir, rename it as solr_home (not required though, but avoids confusion with parent dir)
– Add alias (for ease):
alias startsolr=”cd /opt/solr; java -Dsolr.solr.home=$SOLR_HOME -jar start.jar”

Start Solr

Use command:

$> cd /opt/solr

$> java -Dsolr.solr.home=$SOLR_HOME -jar start.jar

or alias directly:
$> startsolr

Solr Admin

Check the Solr Admin web interface at- localhost:8983/solr

Extra Tips

Solr has the default collection named as collection1. In case you need to modify the default collection name here is one simple stem for that-

– rename Dir : The solr dir would be having a dir for collection1. Rename it to any name you like – say ‘logdata’

– update name in The collection1 dir would be having a file that has its name. Update this name to your selected name – ‘logdata’

Thats all for this post. Will post other Solr tutorials soon.

Cheers \m/

Leave a Reply

Your email address will not be published. Required fields are marked *