Yum Installing MongoDB

Source: Internet
Author: User
Tags install mongodb mongodb version yum install mongodb mongo shell

PS: Now the latest version is 3.2, but the database is built by others, with 2.6

Below we install the MongoDB 2.6.0 version on the CentOS 6.5 x64 system.

But in the MongoDB v2.6.0 version of the software warehouse a total of five packages:

1) mongodb-org
This package is a metadata package that can be implemented to automatically install the following 4 component packages.
2) Mongodb-org-server
This package contains the Mongod daemon, along with the associated configuration and initialization scripts.
3) Mongodb-org-mongos
There is a MONGOs daemon in this package.
4) Mongodb-org-shell
This package has a MONGO shell environment.
5) Mongodb-org-tools
This package contains the following MongoDB tools: Mongoimport, Bsondump, Mongodump, Mongoexport, Mongofiles, Mongoimport, Mongooplog, Mongoperf, Mongorestore, Mongostat and Mongotop.

Control script: The mongodb-org package contains a variety of control scripts, including initialization scripts/etc/rc.d/init.d/mongod
Use the/etc/mongod.conf configuration file to configure MongoDB.

The MongoDB 2.6.0 version no longer has a MONGOs control script. The MONGOs process is used only for sharding scenarios. You can use the Mongod init script to drive the MONGOs control script.

To install the latest 64-bit MongoDB version 2.6.0, follow these steps:

1. Create a Mongodb.repo file

Create the file Mongodb.repo in the/etc/yum.repos.d/directory, which contains the configuration information for the MongoDB repository, as follows:

Copy CodeThe code is as follows:
[MongoDB]
Name=mongodb Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
Gpgcheck=0
Enabled=1

2. Execute the installation command
$ sudo yum install mongodb-org
Loaded plugins:security
Base | 3.7 KB 00:00
base/primary_db | 4.4 MB 00:01
Extras | 3.4 KB 00:00
extras/primary_db | KB 00:00
MongoDB | 951 B 00:00
Mongodb/primary | KB 00:16
MongoDB 155/155
Openlogic | 1.3 KB 00:00
Openlogic/primary | 273 KB 00:00
Openlogic 24/24
Updates | 3.4 KB 00:00
updates/primary_db | 2.6 MB 00:00
Setting up Install Process
Resolving Dependencies
--Running Transaction check
---> Package mongodb-org.x86_64 0:2.6.0-1 'll be installed
--Processing Dependency:mongodb-org-tools = 2.6.0 for package:mongodb-org-2.6.0-1.x86_64
--Processing Dependency:mongodb-org-shell = 2.6.0 for package:mongodb-org-2.6.0-1.x86_64
--Processing Dependency:mongodb-org-server = 2.6.0 for package:mongodb-org-2.6.0-1.x86_64
--Processing Dependency:mongodb-org-mongos = 2.6.0 for package:mongodb-org-2.6.0-1.x86_64
--Running Transaction check
---> Package mongodb-org-mongos.x86_64 0:2.6.0-1 'll be installed
---> Package mongodb-org-server.x86_64 0:2.6.0-1 'll be installed
---> Package mongodb-org-shell.x86_64 0:2.6.0-1 'll be installed
---> Package mongodb-org-tools.x86_64 0:2.6.0-1 'll be installed
--Finished Dependency Resolution

Dependencies resolved

============================================================================================
Package Arch Version Repository Size
============================================================================================
Installing:
mongodb-org x86_64 2.6.0-1 MongoDB 4.6 k
Installing for dependencies:
Mongodb-org-mongos x86_64 2.6.0-1 MongoDB 6.8 M
Mongodb-org-server x86_64 2.6.0-1 MongoDB 8.9 M
Mongodb-org-shell x86_64 2.6.0-1 MongoDB 4.2 M
Mongodb-org-tools x86_64 2.6.0-1 MongoDB M

Transaction Summary
============================================================================================
Install 5 Package (s)

Total Download size:108 M
Installed size:274 M
Is this OK [y/n]: Y
......

Yum Installing MongoDB

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.