MongoDB Installation

From DreamFactory
Jump to: navigation, search
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
==Drivers==
 
==Drivers==
====Bitnami Installs on Windows, Mac, and Linux====
 
'''Note''':The Bitnami packages come with an instance of MongoDB and the drivers already installed. No further action is necessary.
 
  
===Linux===
+
===Manual Install on 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.'''
+
==== Requirements ====
**<source lang=bash>$ sudo apt-get install php-pear php5-dev libpcre3-dev libsasl2-dev</source>
+
* You will need the following items from your package manager (linux)
* '''Use PECL to make the mongo.so file'''
+
** PHP Pear and PHP Dev (for PECL)
**<source lang=bash>$ sudo pecl install mongo</source>
+
** Development tools / (e.g. Build Essential tools)
'''Note''':If the the install generates any errors it will fail. You will need to troubleshoot based on the error reported.
+
** libsslcommon2-dev  
* '''Create a module file for your mongo installation.'''
+
** libssl-dev  
**<source lang=bash>$ sudo touch /etc/php5/mods-available/mongo.ini</source>
+
** libcurl4-openssl-dev  
* '''Edit the file you just created in your preferred text editor.'''
+
** pkg-config
There is a single line in the file it looks like this:
+
 
**<source lang=bash>extension=mongo.so</source>
+
===Manual Install on Mac Sierra +===
* '''Enable the php extension'''
+
* You will need to remove Mongo if brew installed as it had been deprecated: https://gist.github.com/katychuang/10439243
**<source lang=bash>$ sudo php5enmod mongo</source>
+
* Install Mongo drivers: https://github.com/mongodb/mongo-php-driver
* '''Restart your web service service'''
+
* You will need to use PECL to build MongoDB: https://pecl.php.net/package/mongodb/1.5.2
**<source lang=bash>$ sudo service apache2 restart</source>  or
+
 
**<source lang=bash>$ sudo service nginx restart</source>
+
==== Driver Install ====
 +
* In Linux you will need to use PECL to build the mongodb module and then enable in php.
 +
 
 +
For concrete examples, see the [[../../../APT/Ubuntu_16.04/Modules/MongoDB_Ubuntu_16| Ubuntu 16.04]] instructions.

Latest revision as of 05:18, 12 July 2022

Drivers

Manual Install on Linux

Requirements

  • You will need the following items from your package manager (linux)
    • PHP Pear and PHP Dev (for PECL)
    • Development tools / (e.g. Build Essential tools)
    • libsslcommon2-dev
    • libssl-dev
    • libcurl4-openssl-dev
    • pkg-config

Manual Install on Mac Sierra +

Driver Install

  • In Linux you will need to use PECL to build the mongodb module and then enable in php.

For concrete examples, see the Ubuntu 16.04 instructions.