标签:
vi /etc/yum.repos.d/mongodb-org-3.0.repo
添加如下内容:
[mongodb-org-3.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/ gpgcheck=0 enabled=1
安装
sudo yum install -y mongodb-org
启动
sudo service mongod start
设置为开机启动
sudo chkconfig mongod on
停止
sudo service mongod stop
重启
sudo service mongod restart
卸载
sudo service mongod stop sudo yum erase $(rpm -qa | grep mongodb-org) sudo rm -r /var/log/mongodb sudo rm -r /var/lib/mongo
标签:
原文地址:http://my.oschina.net/wanglin123/blog/523606