mongodb-setup.sh 504 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

12
echo "MongoDB Server version:"
Carsten Brandt committed
13 14
mongod --version

15
echo "MongoDB PHP Extension version:"
Carsten Brandt committed
16 17
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