问题
在32位的windows上安装MongoDB,之后执行 mongod 启动服务器出现:
2016-03-22T11:02:51.226+0800 I CONTROL [main]
2016-03-22T11:02:51.227+0800 W CONTROL [main] 32-bit servers don't have journal
ing enabled by default. Please use --journal if you want durability.
2016-03-22T11:02:51.227+0800 I CONTROL [main]
2016-03-22T11:02:51.231+0800 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, will zero-out data files
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] MongoDB starting : pid=6
324 port=27017 dbpath=C:\data\db\ 32-bit host=XX-PC
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] targetMinOS: Windows Vis
ta/Windows Server 2008
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] db version v3.2.4
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] git version: e2ee9ffcf9f
5a94fad76802e28cc978718bb7a30
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] allocator: tcmalloc
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] modules: none
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] build environment:
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] distarch: i386
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] target_arch: i386
2016-03-22T11:02:51.235+0800 I CONTROL [initandlisten] options: {}
2016-03-22T11:02:51.237+0800 I STORAGE [initandlisten] exception in initAndList
en: 28663 Cannot start server. The default storage engine 'wiredTiger' is not av
ailable with this build of mongod. Please specify a different storage engine exp
licitly, e.g. --storageEngine=mmapv1., terminating
2016-03-22T11:02:51.238+0800 I CONTROL [initandlisten] dbexit: rc: 100
解决方法
按照它的指示:“The default storage engine 'wiredTiger' is not available with this build of mongod. Please specify a different storage engine explicitly, e.g. --storageEngine=mmapv1”,换一个storage engine。
执行:
mongod --dbpath=H:\mongodb\test --storageEngine=mmapv1