Md Toy Blog

Solr Mac OSX

2019-04-09T22:00:32.169Z

Solr: copy a named configset

cp -fR /Users/g/Google-Drive/Co/Abage/Callioplayer/solr_config/bsr1 /usr/local/Cellar/solr/7.5.0/server/solr/configsets/bsr1

text

INSTALL SOLR php 7.2 extension on Mac OS X Mojave

So you figured out that brew dropped installing extensions for you. And you want to install php 7.2 solr extension. You go to liip.ch because they appear to support it, but then they tell you you should not install it in Mojave. So you stick to brew’s php7.2. You see that you can run: pear install pecl/solr, but you get an error: error: use of undeclared identifier 'ZENDACCCLONE'; did you mean 'ZENDASTCLONE' You browse around and you see that there is some mysterious commit, that is not packaged yet, so you have no access to the solution with pear or pecl. But the code is there right

so how do you do it?

You use Git. “But, I don’t …” shh just relax, think. Exactly, got to the package main page read that you can actually install it there. You would want a specific commit 744e32915d5989101267ed2c84a407c582dc6f31 or later. But let’s get the repository in our machine first and then we’ll see from there how to get the right commit. Create a normal git blank repo.

mkdir phpsolr
cd phpsolr
git init
git remote add origin https://github.com/php/pecl-search_engine-solr
git pull origin master

text

Now we have all the code in our machine, so let’s see if we find the right commit:

git log --oneline
/744e329

text

We found it, and we notice that it is older than HEAD, so we might as well install the package using the latest version, which we already have in our machine.

vim README.md

text

read it. But if you really want it chewed. The steps are simple:

phpize
./configure
make && make install
We need to activate the extension in php.ini
cd /usr/local/etc/php/7.2
vim php.ini
add this one line in php.ini:
extension=solr.so
:q
sudo apachectl restart

Done! Congrats!