关闭

MongoDB安装-CentOS

319人阅读 评论(0) 收藏 举报

1.运行yum查看MongoDB的包信息

[root@localhost /]# yum info mongo-10gen

如提示没有相关信息则在/etc/yum.repos.d下建立10gen.repo文件

[root@localhost /]# vi etc/yum.repos.d/10gen.repo

文件内容:

name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1

此时做好了yum源的配置,在执行一遍1中yum命令查看MongoDB包信息,确定其正确与否

[root@localhost /]# yum info mongo-10gen
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * extras: mirrors.btte.net
 * updates: mirrors.btte.net
Installed Packages
Name        : mongo-10gen
Arch        : x86_64
Version     : 2.4.8
Release     : mongodb_1
Size        : 184 M
Repo        : installed
From repo   : 10gen
Summary     : mongo client shell and tools
URL         : http://www.mongodb.org
License     : AGPL 3.0
Description : Mongo (from "huMONGOus") is a schema-free document-oriented database.
            : It features dynamic profileable queries, full indexing, replication
            : and fail-over support, efficient storage of large binary data objects,
            : and auto-sharding.
            :
            : This package provides the mongo shell, import/export tools, and other
            : client utilities.

[root@localhost /]#

2.安装:


yum install mongo-10gen-server

安装之后就可以使用了,都是默认配置,可以通过修改mongod.conf修改内部信息。


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场