Installer mongodb¶
http://pecl.php.net/package/mongodb (v1.2.5 le 04/03/2017)
mongo db nécessite openssl version > 1.0
How to build software outside Homebrew with Homebrew keg-only dependencies
http://docs.brew.sh/How-to-build-software-outside-Homebrew-with-Homebrew-keg-only-dependencies.html
export PKG_CONFIG_PATH=$(brew --prefix)/opt/openssl/lib/pkgconfig
/usr/local/opt/php71/bin/phpize
./configure --with-php-config=/usr/local/opt/php71/bin/php-config CFLAGS=-I$(brew --prefix)/opt/openssl/include LDFLAGS=-L$(brew --prefix)/opt/openssl/lib
make
sudo make install
Sinon avec Homebrew
$ brew tap homebrew/php
$ brew install phpxx-mongodb
Pour démarrer mongodb:
$ brew services start mongodb
Then access the shell by: mongo
Stopper la base:
$ brew services stop mongodb
Plus d'options:
$ brew info mongodb
Dernière mise à jour:
November 9, 2023