Linux命令窗口直接Ctrl+C退出,那么mongod就会被关闭
$ mongod
2016-02-01T17:51:24.743+0800 I CONTROL [initandlisten] MongoDB
starting : pid=19587 port=27017 dbpath=/data/db 64-bit host=iZ28krk4xlkZ
在使用 mongod 的配置中运行 --fork 不行
mongod --fork
BadValue --fork has to be used with --logpath or --syslog
try 'mongod --help' for more information
根据提示 修改如下 还是error
mongod --fork --logpath '/data/log'
about to fork child process, waiting until server is ready for connections.
forked process: 28117
ERROR: child process failed, exited with error number 1
使用官方 的 安装 文档
如何 持久化运行 mongodb 服务
nohup mongod &