ubuntu服务器 mongodb.conf:
# mongodb.conf
# Where to store the data.
dbpath=/var/lib/mongodb/data
#where to log
logpath=/var/log/mongodb/mongodb.log
logappend=true
bind_ip=0.0.0.0
port = 27017
fork = true
# Enable journaling, http://www.mongodb.org/display/DOCS/Journaling
journal=false
# Enables periodic logging of CPU utilization and I/O wait
#cpu = true
# Turn on/off security. Off is currently the default
#noauth = true
auth = true
然后 启动mongodb服务:
root@VM-4-3-ubuntu:/# mongod --dbpath /var/lib/mongodb/data --logpath /var/log/mongodb/mongodb.log --port=27017 --logappend --bind_ip 0.0.0.0 --fork --auth
about to fork child process, waiting until server is ready for connections.
forked process: 3422
child process started successfully, parent exiting
客户端连接不上,是哪里还缺少设置吗?