Installing MongoDB on FreeBSD 10.x

Installing MongoDB on FreeBSD 10.x

We can simply run the following to install MongoDB. However, the version installed will not be the latest. At the time of writing, it will be 2.6.7.

#pkg install mongodb

We can perform the following to install the latest MongoDB version:

# portsnap fetch
# portsnap extract
# portsnap fetch update
# cd /usr/ports/databases/mongodb32/
# make config-recursive
# make install clean

Add startup settings to /etc/rc.conf:


Add settings to /usr/local/etc/mongodb.conf:

master = true
nohttpinterface = true

Start mongod daemon:

# service start mongod


Edit: To install MongoDB 3.2. Simply perform “pkg install mongodb32”.

Wei Shan


  1. How-To: MongoDB on FreeBSD 10.x -

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: