MongoDB安装-CentOS

来源:互联网 发布:淘宝小商品推广免单 编辑:程序博客网 时间:2024/05/17 06:05

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 Repositorybaseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64gpgcheck=0enabled=1

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

[root@localhost /]# yum info mongo-10genLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.btte.net * extras: mirrors.btte.net * updates: mirrors.btte.netInstalled PackagesName        : mongo-10genArch        : x86_64Version     : 2.4.8Release     : mongodb_1Size        : 184 MRepo        : installedFrom repo   : 10genSummary     : mongo client shell and toolsURL         : http://www.mongodb.orgLicense     : AGPL 3.0Description : 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修改内部信息。


原创粉丝点击