1.进入mongodb的bin目录执行命令
2.启动服务 mongod –dbpath [mongodb路径]\data –storageEngine =mmapv1 –journal
3.浏览器输入http://localhost:27017/
出现页面提示
It looks like you are trying to access MongoDB over HTTP on the native driver port.
服务正常
MongoDB默认数据目录是放到C:\data\db下的,可以在安装时不指定–dbpath参数指向默认地址。
在cmd中或日志文件中提示:
exception in initAndListen: 28663 Cannot start server. The default storage engine ‘wiredTiger’ is not available with this build of mongod. Please specify a different storage engine explicitly, e.g. –storageEngine=mmapv1., terminating
可以在命令中添加–storageEngine=mmapv1参数进行解决