在红帽、Centos、Fedora 和 Amazon 等 Linux 上安装 MongoDB
一、程序包
MongoDB 有两个程序包,至于这些介绍你你可以不管就是。
1.mongo-10gen-server
This package contains the mongod and mongos daemons from the latest stable release and
associated configuration and init scripts. Additionally, you can use this package to install daemons
from a previous release of MongoDB.
2.mongo-10gen
This package contains all MongoDB tools from the latest stable release. Additionally, you
can use this package to install tools from a previous release of MongoDB. Install this package on
all production MongoDB hosts and optionally on other systems from which you may need to
administer MongoDB systems.
二、安装
1.使用 YUM 配置管理程序包
新建文件:/etc/yum.repos.d/mongodb.repo,然后写如下配置(做开发的话,还是推荐使用
64 位的)
64 位系统写入如下配置:
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
32 位的写入如下配置
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686/
gpgcheck=0
enabled=1
2.安 装 程
序包
以管理员 root 或者 sudo 身份运行安装:
yum install mongo-10gen mongo-10gen-server
评论0