Install MongoDB

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/?_ga=1.25950975.395536525.1415167309

 

(1)Import the public key used by package management system

The Ubuntu package management tools ensure package consistency and authenticity by requiring that 

distributors sign packages with GPG keys. Issue the following command to import the MongoDB public

GPG key:

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

(2)Create a list file for MongoDB

Create the /etc/apt/sources.list.d/mongdb-org-3.0.list list file using the following command:

echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

(3)Reload local package database

Issue the following command to reload the local package database:

sudo apt-get update

(4)Install the MongoDB package

You can install either the lastest version of MongoDB or a specific version of MongoDB

   You can install the latest stable version of MongoDB

sudo apt-get install -y mongodb-org

   Or, install a specific release of MongoDB

  

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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值