Installing MongoDB on FreeBSD 10.x

Installing MongoDB via ports on FreeBSD 10.x

We can simply run the following to install MongoDB. Or, we can install MongoDB via ports.

#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 mongod start


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

Wei Shan



2 thoughts on “Installing 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