Home  >  Article  >  Database  >  在Ubuntu上安装MongoDB

在Ubuntu上安装MongoDB

WBOY
WBOYOriginal
2016-06-07 17:13:24981browse

在Ubuntu上安装MongoDB,由于Ubuntu版本发行的规则,版本库里往往不是最新的组建,所以有时候需要使用官方的PPA进行补充,例如Mo

由于Ubuntu版本发行的规则,版本库里往往不是最新的组建,所以有时候需要使用官方的PPA进行补充,例如MongoDB,版本库里的版本连UTF-8都不支持。官方已经有很详细的解释说明,,这里主要是复述记录一下。

废话不多说,上代码:

# Add GPG key 添加GPG密钥
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

# Add source list 添加软件源
echo "deb dist 10gen" > /etc/apt/sources.list.d/mongodb.list

# update and install 更新软件源并安装
apt-get update
apt-get install mongodb-10gen

这里也有一个简单的脚本实现自动安装,拷贝到单独的文件中,运行”sudo sh 文件名”即可。

脚本下载:

免费下载地址在

用户名与密码都是

具体下载目录在 /2012年资料/5月/3日/在Ubuntu上安装MongoDB/

更多Ubuntu相关信息见Ubuntu 专题页面 ?tid=2

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn