Category Archives: mongodb

Building MongoDB PHP driver by phpize

Download the source code from Github. The run the following commands:

For more detail how to build php extension please check this example: Building MySQL Native Driver(Mysqlnd) for PHP by phpize

Build mongodb from source code on Ubuntu

If you want build mongodb from source code we need at least 2G RAM and 25G storage.

Install scons

Build the source code



Error fixes

“collect2: error: ld terminated with signal 9 [Killed]” If saw this which maybe you need more memory or more swap.

“collect2: error: ld returned 1 exit status” this is maybe because you don’t have enough space.

Create configure file /usr/local/mongodb/etc/mongod.conf

create files or directories base on the config file:

Set the PATH variable

Add the following lines to the ~/.profile

Start Mongodb Daemon

Error fixes:

sudo error: command not found