centos7使用yum安装mongodb
- 安装软件:
yum -y install MongoDB mongodb-devel mongodb-server
- 修改配置文件:
vim /etc/mongod.conffork = true pidfilepath = /var/run/mongodb/mongod.pid logpath = /var/log/mongodb/mongod.log unixSocketPrefix = /var/run/mongodb dbpath = /var/lib/mongodb port=27017
- 启动服务:
systemctl start mongod
- 连接数据库:
mongo
- 测试:
新闻标题:centos7使用yum安装mongodb
链接分享:http://myzitong.com/article/ppeepi.html