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:

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

References:

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

Regards,
Wei Shan

 

Advertisements
  1. How-To: MongoDB on FreeBSD 10.x - FreeBSDNews.com

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 )

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: