##store data here dbpath=F:\mongodb-win32-x86_64-2.4.5\mongodb-win32-x86_64-2.4.5\data ##all output go here logpath=F:\mongodb-win32-x86_64-2.4.5\mongodb-win32-x86_64-2.4.5\log\mongo.log ##log read and write operations diaglog=3
2.用install安装服务
mongod --config D:\mongodb\mongo.config --install
3.安装成功后可以用命令行启动服务和关闭服务
net start MongoDB net stop MongoDB
4.移除服务
mongod --remove