Monday, 7 March 2016

Install MongoDB On Ubuntu 15.04


### Import the public key used by the package management system.¶


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



###  Create a list file for MongoDB.


Create the /etc/apt/sources.list.d/mongodb-org-3.0.list list file using the command appropriate for your version of Ubuntu:



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



###  Reload local package database.



sudo apt-get update



##  Install the MongoDB packages.


Install the latest stable version of MongoDB.¶



sudo apt-get install -y mongodb-org



###  Install a specific release of MongoDB.¶



sudo apt-get install -y mongodb-org=3.0.6 mongodb-org-server=3.0.6 mongodb-org-shell=3.0.6 mongodb-org-mongos=3.0.6 mongodb-org-tools=3.0.6





Install the MongoDB packages.


You can install either the latest stable version of MongoDB or a specific version of MongoDB.

Install the latest stable version of MongoDB.


Issue the following command:


sudo apt-get install -y mongodb-org


Install a specific release of MongoDB.


To install a specific release, you must specify each component package individually along with the version number, as in the following example:


sudo apt-get install -y mongodb-org=3.0.6 mongodb-org-server=3.0.6 mongodb-org-shell=3.0.6 mongodb-org-mongos=3.0.6 mongodb-org-tools=3.0.6


If you only install mongodb-org=3.0.6 and do not include the component packages, the latest version of each MongoDB package will be installed regardless of what version you specified.


Start MongoDB.



Ref :


http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

http://tecadmin.net/install-mongodb-on-ubuntu/#

No comments: