CentOS 6.5 Installation MongoDB 2.6

Source: Internet
Author: User
Tags create mongodb install mongodb mongodb yum install mongodb mongo shell
CentOS 6.5 Installation MongoDB 2.6Author: Chszs, reprint should be indicated. Blog home: Http://blog.csdn.net/chszs

Below we install the latest MongoDB 2.6.0 version on the CentOS 6.5 x64 system.
The MongoDB v2.4.x version of the software warehouse has two packages:
1) mongo-10gen-server
This package contains the latest version of the Mongod and MONGOs daemons and associated configuration and initialization scripts.
2) Mongo-10gen
This package has all the MongoDB tools in the latest edition. These tools make it easy for you to manage MongoDB systems.

However, 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 implements the 4 component packages that are installed automatically below.
2) Mongodb-org-server
This package contains Mongod daemons, as well as related configuration and initialization scripts.
3) Mongodb-org-mongos
There is a MONGOs daemon in this package.
4) Mongodb-org-shell
This package contains 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 scripts: The mongodb-org package contains various control scripts, including initialization scripts/etc/rc.d/init.d/mongod
Use the/etc/mongod.conf configuration file to configure the MongoDB.

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

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

1. Create Mongodb.repo files
Create a file Mongodb.repo in the/etc/yum.repos.d/directory that contains configuration information for the MongoDB warehouse, as follows:
[MongoDB]
Name=mongodb Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

2. Execute 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 m Ongodb-org.x86_64 0:2.6.0-1 is installed--> processing = Dependency:mongodb-org-tools for 2.6.0 -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--& Gt Processing dependency:mongodb-org-server = 2.6.0 for package:mongodb-org-2.6.0-1.x86_64--> Processing dependency:m Ongodb-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---&G T Package mongodb-org-shell.x86_64 0:2.6.0-1 would be installed---> Package mongodb-org-tools.x86_64 0:2.6.0-1 would be in Stalled--> 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) Tota L Download size:108 M InstalleD size:274 M is this OK [y/n]: Y ... 

3. Configure SELinux Firewall
Open Port 27017

4, start MongoDB
$ sudo service mongod start

5. Verify MongoDB
You can determine whether the Mongod process is working correctly by examining the contents of the log file/var/log/mongodb/mongod.log.
You can also execute commands:
$ sudo chkconfig mongod on

To stop MongoDB, execute:
$ sudo service Mongod stop

To reboot the MongoDB, execute:

$ sudo service mongod restart


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.