MongoDB

From DreamFactory
Jump to: navigation, search

Drivers

Bitnami Installs on Windows, Mac, and Linux

The Bitnami packages come with an instance of MongoDB and the drivers already installed. No further action is necessary.

Linux

  • Ensure that you have the php-pear and php5-dev packages installed on your system. You will also need the pcre3 and sasl2 development libraries.
    • $ sudo apt-get install php-pear php5-dev libpcre3-dev libsasl2-dev
  • Use PECL to make the mongo.so file
    • $ sudo pecl install mongo
    • If the the install generates any errors it will fail. You will need to troubleshoot based on the error reported.
  • Create a module file for your mongo installation.
    • $ sudo touch /etc/php5/mods-available/mongo.ini
  • Edit the file you just created in your preferred text editor.
    • There is a single line in the file it looks like this:
    • extension=mongo.so
  • Enable the php extension
    • $ sudo php5enmod mongo
  • Restart your web service service
    • $ sudo service apache2 restart
      or
    • $ sudo service nginx restart