MongoDB 3.0 Replica Set Build

Source: Internet
Author: User
Tags install mongodb

Environment Configuration


MongoDB Installation

Download Yum Source Configuration

wget Https://repo.mongodb.org/yum/redhat/mongodb-org-3.0.repo MV mongodb-org-3.0.repo/etc/yum.repos.d/

Installing MongoDB

Yum-y Install mongodb-org

Modify the MongoDB configuration file

# Modify the Listener address to 0.0.0.0net:port:27017 bindip:0.0.0.0# Modify the replica set configuration replication:oplogsizemb:20480 Replsetname:gogen

Modify Kernel Configuration

# It's best to join the boot profile echo never >/sys/kernel/mm/transparent_hugepage/enabledecho never >/sys/kernel/mm/transparent_ Hugepage/defrag

Modify the file descriptor /etc/security/limits.conf

# After the configuration file is added later content Mongod soft nofile 64000mongod hard nofile 64000mongod soft nproc 32000mongod hard Nproc 32000

Start the service

Chkconfig Mongod onservice mongod start

Replica Set Configuration

Test

MongoDB 3.0 Replica Set Build

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.