- Make sure you have sufficient disk space to hold the oplog ( can be several GB )
- Edit
/etc/mongodb.confto addreplSet = rs0 - Restart mongodb
- In the mongo REPL execute
rs.initiate()( this can take some time; log shows activity ) - Try executing a query, your REPL prompt should now be
rs0:PRIMARY>
MongoDB documentation: http://docs.mongodb.org/manual/tutorial/convert-standalone-to-replica-set/
- Locate your elasticsearch plugin script
/usr/share/elasticsearch/bin/plugin - Install
elasticsearch-mongodb-riverwith the command below - Restart elasticsearch
Note: Always install the latest stable version from https://github.com/richardwilly98/elasticsearch-river-mongodb (at time of writing this is 1.6.11)
sudo /usr/share/elasticsearch/bin/plugin -url https://oss.sonatype.org/content/repositories/releases/com/github/richardwilly98/elasticsearch/elasticsearch-river-mongodb/1.6.11/elasticsearch-river-mongodb-1.6.11.zip -install river-mongodb