Skip to content

Instantly share code, notes, and snippets.

@putermancer
Created September 22, 2010 16:01
Show Gist options
  • Save putermancer/591964 to your computer and use it in GitHub Desktop.
Save putermancer/591964 to your computer and use it in GitHub Desktop.
Set up a local solr instance on mac
# Setting up a local solr instance on a mac
# install solr with homebrew
brew install solr
# create the base solr index directory
mkdir -p /data/solr
# make sure you can write to the solr logs
sudo chown -R `whoami` /usr/local/Cellar/solr/
# go! Note: you must use the fully-qualfied path!
solr /full/path/to/multicore
# If you get weird error messages when you launch solr, it is likely due to permissions
# or lacking a "logs" directory (the error message will show you where it is expecting it).
# Create the log directory if necessary. and verify permissions or just run as the super user:
#
# sudo solr /full/path/to/multicore
# http://localhost:8983/solr/product/select/?q.alt=*:*&start=0&rows=10&indent=on
@shrop
Copy link

shrop commented Apr 19, 2013

Thanks for this! I am digging keeping my solr data with brew stuff at /usr/local/var/solr.

@simoneloru
Copy link

thanks! great!

@mikeymicrophone
Copy link

I'm confused what the "multicore" referenced on line 13 is. A config file?

@sdhull
Copy link

sdhull commented Oct 15, 2013

@mikeymicrophone I am also kinda confused about that. You make any progress on it?

@antonagestam
Copy link

When installing solr I got this error message:

$ brew install solr
==> Downloading http://www.apache.org/dyn/closer.cgi?path=lucene/solr/4.4.0/solr-4.4.0.tgz
==> Best Mirror http://apache.mirrors.spacedump.net/lucene/solr/4.4.0/solr-4.4.0.tgz

curl: (22) The requested URL returned error: 404 Not Found
Error: Download failed: http://www.apache.org/dyn/closer.cgi?path=lucene/solr/4.4.0/solr-4.4.0.tgz

Running brew update fixed it.

@appel268576
Copy link

@nezaboravi
Copy link

Question:

create the base solr index directory

mkdir -p /data/solr

  1. Where to make this dir? In user root? or in Solr dir?

go! Note: you must use the fully-qualfied path!

solr /full/path/to/multicore
2) what is a path to multicore?

@earino
Copy link

earino commented Dec 4, 2013

you might need to sudo to do the mkdir

@ojiman
Copy link

ojiman commented Dec 31, 2013

very helpful!

@heiglandreas
Copy link

full/path/to/multicore is /data/solr. And it is totally up to you where you put your sole-files to. Personally I put them into a new Folder /Library/Solr. But as long as no configfiles are inside, that doesn't make any sense. So copy the configfiles from usr/local/opt/solr/libexec/examples/multicore to wherever you need them.

cp -R /usr/local/opt/solr/libexec/example/multicore /Library/Solr
solr /Library/Solr

@daamsie
Copy link

daamsie commented May 16, 2014

@antonagestam I got this too. I ran 'brew update' and it then worked.

@gouravtiwari
Copy link

@antonagestam good tip!

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