由于服务器中使用了阿里云提供的源,安装的MongoDB版本太低(好像是MongoDB 2.0.4),MongoDB 3.0出来也有一段时间了,咱也尝尝鲜。下面来介绍我的升级方法,此安装方法来自于MongoDB官网http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/。 (小虾 虎鱼原创)
导入public GPG Key:
Import the public key used by the package management system: The Ubuntu package management tools (i.e. dpkg and apt) 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
将MongoDB的源地址添加到源中
Create a list file for MongoDB: Create the /etc/apt/sources.list.d/mongodb-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
更新源
Issue the following command to reload the local package database: Reload local package database
sudo apt-get update
安装MongoDB
Install the MongoDB packages: You can install either the latest stable version of MongoDB or a specific version of MongoDB.
安装最新稳定版的MongoDB
sudo apt-get install -y mongodb-org
安装特定版本的MongoDB
Specify each component package individually and append the version number to the package name, as in the following example
sudo apt-get install -y mongodb-org=3.0.1 mongodb-org-server=3.0.1 mongodb-org-shell=3.0.1 mongodb-org-mongos=3.0.1 mongodb-org-tools=3.0.1
最后可以通过命令mongo --version来查看MongoDB的版本号。
敢达决战官方正版 安卓版v6.7.9
下载敢达决战 安卓版v6.7.9
下载像素火影骨架佐助 (Perseverance Fire Shadow)手机版v1.16
下载要塞英雄 安卓版v33.20.0-39082670-Android
下载梦想城镇vivo最新版本 安卓版v12.0.1
梦想城镇vivo版是这款卡通风模拟经营类手游的渠道服版本,玩
怦然心动的瞬间 安卓版v1.0
怦然心动的瞬间是一款真人向的恋爱互动游戏,在游戏中玩家将扮演
曼尼汉堡店游戏 安卓版v1.0.3
曼尼汉堡店是一款非常好玩的精品恐怖类型冒险游戏,在这款游戏中
现代总统模拟器去广告版 安卓版v1.0.46
现代总统模拟器是一款休闲养成类游戏,可能对于不少的玩家来说都
现代总统模拟器付费完整版 安卓版v1.0.46
现代总统模拟器高级版在商店是需要付费的,相对于普通版本,高级