mongodb限制内存和安装

# engine:
mmapv1:
smallFiles: true
wiredTiger:
engineConfig:
configString : cache_size=512M


echo "deb [ arch=amd64 ] http://mirrors.aliyun.com/mongodb/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
yum list
yum -y install mongodb-org
vim /etc/mongod.conf
【mongodb限制内存和安装】(1)systemctl start mongod.service #启动
systemctl stop mongod.service #关闭
(2) mongod -f /etc/mongod.conf #启动
mongod -f /etc/mongod.conf --shutdown #关闭

    推荐阅读