您的位置:首页 > 数据库 > Mongodb

centos 安装 mongodb 服务

2016-01-27 00:00 369 查看
安装

yum install mongodb-server


启动

systemctl start mongod


查看状态

systemctl status mongod  //查看状态


配置路径
默认配置文件*/etc/mongod.conf*

...
# Directory for datafiles (defaults to /data/db/)
dbpath = /var/lib/mongodb
...


允许外网访问
默认配置文件*/etc/mongod.conf*,注释掉bind_ip

...
# Comma separated list of ip addresses to listen on (all local ips by default)
#bind_ip = 127.0.0.1
...
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  centos mongodb