mongodb3.2 Installation and Basic configuration

Source: Internet
Author: User
Tags brew install mongodb install mongodb yum install mongodb

First, using Yum to install MongoDB 3.2

[Email protected] ~]# Cat/etc/yum.repos.d/mongodb.repo

[mongodb-org-3.2]

Name=mongodb Repository

baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/

Gpgcheck=0

Enabled=1

[email protected] ~]# Yum install mongodb-org*


[[email protected] ~]# egrep-v "^ (#|$)"/etc/mongod.conf

Systemlog:

Destination:file

Logappend:true

Path:/data/mongodb/log/mongod.log

Storage

DbPath:/data/mongodb/data

Directoryperdb:true

Journal

Enabled:true

Processmanagement:

Fork:true # Fork and run in background

Pidfilepath:/data/mongodb/conf/mongod.pid # Location of Pidfile

Net

port:27027

#bindIp: 127.0.0.1 # Listen to local interface only, comment to Listen on all interfaces.

[[email protected] ~]# mkdir-p/data/mongodb/{conf,data,log}

[Email protected] ~]# chown-r Mongod. /data/mongodb


[Email protected] ~]# tail/etc/security/limits.conf

# End of File

Mongod Soft Nproc 40000

* Hard Nofile 1000000

* Soft Nofile 1000000

* Soft Core Unlimited

* Soft Stack 10240

*-Nofile 65535

Push-nproc 65535

Push-nofile 320000

Work-nproc 10000


[Email protected] ~]# cat/etc/security/limits.d/90-nproc.conf

# Default limit for number of user ' s processes to prevent

# Accidental fork bombs.

# See RHBZ #432903 for reasoning.


* Soft Nproc 1024

Root Soft Nproc Unlimited

[Email protected] ~]#


[Email protected] ~]# sed-n ' 62,64p '/etc/init.d/mongod

if [-f/sys/kernel/mm/transparent_hugepage/defrag]; Then

echo Never >/sys/kernel/mm/transparent_hugepage/defrag

Fi

[[Email protected] ~]# service Mongod start


Second, the MacBook Pro installs MongoDB

Reference: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

Installation brew:/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

Brew Update

Brew Install MongoDB

Mongod--config/usr/local/etc/mongod.conf

Third, MONGO client tools are: http://docs.mongodb.org/ecosystem/tools/administration-interfaces/



This article is from the "11462293" blog, please be sure to keep this source http://11472293.blog.51cto.com/11462293/1790860

mongodb3.2 installation and basic configuration

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.