Tuesday, November 22, 2016

Install mongodb server in ubuntu 16.04

Another micropost. Ubuntu also has a mongodb-server package which installs an older version. This post will guide you to install the official mongodb server. [docs]

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927

If you are on a proxy, add --keyserver-options

sudo apt-key adv --keyserver-options http-proxy=PROXY_URL:PORT --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927

Then run,

echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

Finally,

sudo apt-get update
sudo apt-get install mongodb-org-server

Run mongo demon

mongod

That's all.

No comments:

Post a Comment