Installing MongoDB detailed process under Linux

Source: Internet
Author: User
Tags mongodb version

This installation MongoDB uses Yum.repo mode. Please refer to the detailed procedures, but also list some of the errors in the installation process, welcome correction.

MongoDB Version: 3.0

CD to/etc/yum.repos.d/on Linux first

New script file Mongodb-org-3.0.repo:

1 [mongodb-org-3.0]23.0  Repository3 Baseurl=https: // repo.mongodb.org/yum/redhat/6/mongodb-org/3.0/x86_64/ 4 gpgcheck=05 enabled=1

: Wq after saving, clean up Yum resources

Yum Clean All

Then search for the next source

Yum Search MongoDB

The name of the search will prevail.

After search, the result is mongodb-org.x86_64, then MONGO installation can be

Yum Install mongodb-org.x86_64

Note: During the installation process, if you encounter the following error:

[[Email protected]Yum. repos.d]#Yum Installmongodbloaded plugins:fastestmirrorsetting up Install processloading mirror speeds from cached Hostfile*base:mirror.bit.edu.cn*epel:mirrors.aliyun.com*extras:mirror.neu.edu.cn*updates:mirrors.btte.netResolving Dependencies-Running Transaction Check---> Package mongodb.x86_640:2.4. --1. El6 'll be installed-Processing conflict:mongodb-org-3.0.2-1. el6.x86_64 Conflicts MongoDB-Processing conflict:mongodb-org-mongos-3.0.2-1. el6.x86_64 Conflicts MongoDB-Processing conflict:mongodb-org-server-3.0.2-1. el6.x86_64 Conflicts MongoDB-Processing conflict:mongodb-org-shell-3.0.2-1. el6.x86_64 Conflicts MongoDB-Processing conflict:mongodb-org-tools-3.0.2-1. el6.x86_64 Conflicts MongoDB-finished Dependency resolutionerror:mongodb-org-mongos conflicts with mongodb-2.4. --1. El6.x86_64Error:mongodb-org-server conflicts with mongodb-2.4. --1. El6.x86_64Error:mongodb-org-tools conflicts with mongodb-2.4. --1. El6.x86_64Error:mongodb-org-shell conflicts with mongodb-2.4. --1. El6.x86_64Error:mongodb-org conflicts with mongodb-2.4. --1. El6.x86_64you could try using--skip-broken to work around the problemyou could try running:rpm-va--nofiles--nodigest

Here's how to fix it:

Yum Install mongodb-org.x86_64--skip-broken

Skip the dependencies and you can install them.

Mongod Boot:

Service Mongod Start

Close (Find to process and kill):

PS -ef| grep Mongod kill xx pid

If there are some warnings similar to the following:

 I CONTROL [initandlisten] * * WARNING:/sys/kernel/mm/transparent_hugepage/enabled is   always     * * We suggest setting it to  " never   " i CONTROL [Initandlisten] I CONTROL [Initandlisten]  * * WARNING:/sys/kernel/mm/transparent_hugepage/defrag is   always     * * We suggest setting it to  " never   
Echo " never " >/sys/kernel/mm/transparent_hugepage/enabledecho"never" >/sys/kernel/mm/transparent_hugepage/defrag

Please refer to the following information: http://bbs.51cto.com/thread-1146184-1.html

If you encounter such an error:

- -08t11:14.789+08006400032000  0.5 times number of files.

You can try:

cd/etc/security/-nproc.conf

* Soft Nproc 32000

Root Soft Nproc Unlimited

Change the first line to the value of the hint (value here: number of processes should is at least 32000)

Close MongoDB:

Mongod-f/etc/mongod.conf--shutdown

View MONGO Status:

Service Mongod Status

Start MONGO:

Mongod-f/etc/mongod.conf

To view the running status:

PS aux| grep Mongod
Netstat-aux|grep Mongod

Installing MongoDB detailed process under Linux

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.