mongodb-setup.sh 493 Bytes
Newer Older
1
#!/bin/sh -e
Carsten Brandt committed
2 3 4
#
# install mongodb

Carsten Brandt committed
5 6
if (php --version | grep -i HipHop > /dev/null); then
  echo "mongodb does not work on HHVM currently, skipping"
Carsten Brandt committed
7
  exit 0
Carsten Brandt committed
8 9 10
else
  echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
fi
Carsten Brandt committed
11

Carsten Brandt committed
12 13 14 15 16 17
# show mongodb version
mongod --version

# show mongo PHP extension version
php -i |grep mongo -4 |grep -2 Version

18 19
# enable text search
mongo --eval 'db.adminCommand( { setParameter: true, textSearchEnabled : true})'
Carsten Brandt committed
20

21
cat /etc/mongodb.conf