CentOS 6 install MongoDB and server configuration using yum

Source: Internet
Author: User
Tags install mongodb mongodb server mongo shell

There are many ways to install MongoDB. you can install MongoDB in source code or in CentOS using yum source. Because MongoDB is updated fast, I prefer the yum source installation method. The installation steps for 64-bit Centos are as follows:

1. Preparations

Run the yum command to view the MongoDB package information [root@ Localhost~] # Yum info mongo-10gen

(No matching information is displayed.) The yum source in your centos system does not contain MongoDB resources. Therefore, you need to add the yum source before installing MongoDB using the yum command, that is, in/etc/yum. repos. d/Add * to the directory *. repo yum source configuration file

2. vi/etc/yum. repos. d/10gen. repo. Enter the following statement:

[10gen]

Name = 10gen Repository

Baseurl = http:// Downloads-distro.mongodb.org/repo/RedHat/ OS /x86_64

Gpgcheck =0

After configuring the yum source, if the configuration is correct, execute the following command to query MongoDB-related information:

View mongoDB server package information

[Root @ localhost geffzhang] # yum info mongo-10gen-server
* Base: centos.ustc.edu.cn
* Extras: centos.ustc.edu.cn
* Updates: centos.ustc.edu.cn
Installed Packages
Name: mongo-10gen-server
Arch: x86_64
Version: 2.0.6
Release: mongodb_1
Size: 13 M
Repo: installed
From repo: 10gen
Summary: mongo server, sharding server, and support scripts
URL: http://www.mongodb.org
License: AGPL 3.0
Description: Mongo (from "huMONGOus") is a schema-free document-oriented
: Database.
:
: This package provides the mongo server software, mongo sharding
: Server softwware, default configuration files, and init. d scripts.

View Client installation status [help house http://www.bkjia.com]
[Root @ localhost geffzhang] #

* Base: centos.ustc.edu.cn
* Extras: centos.ustc.edu.cn
* Updates: centos.ustc.edu.cn
Installed Packages
Name: mongo-10gen
Arch: x86_64
Version: 2.0.6
Release: mongodb_1
Size: 69 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.

3,Install MongoDB server and client tools
[Root @ localhost geffzhang] #Yum install mongo-10gen-server

[Root @ localhost geffzhang] #Yum install mongo-10gen

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.