Linux学习MongoDB第一天,启动就报错
[root@localhost mongodb]# mongod --port=27017 --logpath=./log --dbpath=./db --fork
about to fork child process, waiting until server is ready for connections.
forked process: 2454
ERROR: child process failed, exited with 100
To see additional information in this output, start without the "--fork" option.
这个报错码是100,原因是没创建dbpath的文件夹,在dbpath的位置把文件夹创建出来就可以了
[root@localhost mongodb]# mkdir db log
[root@localhost mongodb]# mongod --port=27017 --logpath=./log/mongodb.log --dbpath=./db --fork
about to fork child process, waiting until server is ready for connections.
forked process: 3429
child process started successfully, parent exiting