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 to use yum source security.
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 to use yum source security.
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:
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 [Linux community]
[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:
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
,