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

(1)systemctl start mongod.service #启动

systemctl stop mongod.service #关闭

(2) mongod -f /etc/mongod.conf #启动

mongod -f /etc/mongod.conf --shutdown #关闭

posted @ 2019-12-23 08:24  landv  阅读(268)  评论(0编辑  收藏  举报