-
-
Save putermancer/591964 to your computer and use it in GitHub Desktop.
| # 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 |
thanks! great!
I'm confused what the "multicore" referenced on line 13 is. A config file?
@mikeymicrophone I am also kinda confused about that. You make any progress on it?
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.
Question:
create the base solr index directory
mkdir -p /data/solr
- 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?
you might need to sudo to do the mkdir
very helpful!
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
@antonagestam I got this too. I ran 'brew update' and it then worked.
@antonagestam good tip!
Thanks for this! I am digging keeping my solr data with brew stuff at /usr/local/var/solr.