目前只安裝了兩個版本
3.0.12
3.2.9
發(fā)現(xiàn)兩個都無法使用--fork參數(shù)
報錯信息:
Error parsing INI config file: unrecognised option 'fork'
try 'mongod --help' for more information
于是mongod --help之后,列出的一大竄里根本就沒有--fork。
是不是現(xiàn)在的版本不支持--fork參數(shù)了
I just found a 2.4.5 version, and the --fork parameter cannot be used.
The command --fork only works for Linux/Unix. If you need --fork for
running mongod in background, on Windows that can be achieved by
installing mongod as a service. When use mongod --install option to
install mongodb service, the --dbpath and --logpath are required. In
my case, I need use administrator command console to install the
service.
It seems that windows does not support the --fork parameter. The solution is to use --install to install the windows service.
mongodb.conf file
Start the server under cmd
mongodb.log file
Because direct cmd startup does not have enough permissions, administrator rights are required to open cmd.exe.
cmd administrator rights to start the server
mongodb.log file
Then directly enter net start MongoDB to start the server, and then you can close the window (it is running in the background).