Centos7 MongoDB 环境安装

添加以下内容
vim /etc/yum.repos.d/mongodb-org-4.0.repo

[mngodb-org]
name=MongoDB Repository
baseurl=http://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/4.0/x86_64/
gpgcheck=0
enabled=1
yum -y install mongodb-org
设置远程访问(慎重)
vim /etc/mongod.conf
bindIp: 172.0.0.1  改为 bindIp: 0.0.0.0
服务管理
systemctl start|status|stop|enable mongod.service

猜你喜欢

转载自www.cnblogs.com/AngryPigs/p/12219263.html