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