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:

mongod_enable="YES"
mongod_config="/usr/local/etc/mongodb.conf"
mongod_dbpath="/var/db/mongodb"

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

master = true
nohttpinterface = true

Start mongod daemon:

# service mongod start

References:

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

Regards,
Wei Shan

 

Advertisements

2 thoughts on “Installing MongoDB on FreeBSD 10.x”

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s