Fork me on GitHub

yum install mongodb-server mongodb

edit /etc/mongod.conf

[root@centos7-base ~]# sed -i 's#bind_ip = 127.0.0.1#bind_ip = 0.0.0.0#' /etc/mongod.conf 
[root@centos7-base ~]# grep 0.0.0.0 /etc/mongod.conf
bind_ip = 0.0.0.0

look for port and status of the mongod

systemctl start mongod.service 
systemctl status mongod.service
ss -lnatup | grep 27017
netstat -lnatup | grep mongod
ps -ef | grep mongod

connect mongod server

posted on 2019-11-22 22:11  anyux  阅读(143)  评论(0编辑  收藏  举报