I have a standalone instance of mongodb (on windows) and want to enable oplog without replicaset.
I found this SO post and set the --master option in my windows service path. But oplog is not created. Any advice?
D:\\MongoDB\\2.6.5\\bin\\mongod.exe --dbpath=D:\\MongoDB\\2.6.5\\data\\db\\ --logpath=D:\\MongoDB\\2.6.5\\log\\mongo.log --service --master
Besides starting it with --master and --logpath you also need to enable it manually by executing the following in mongo shell:
use local
rs.initiate( { _id : 'q', version : 1, members : [ {_id : 0, host : '127.0.0.1'} ] } )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.