Stop the mongod process. Now, restart the mongod process adding the option --shardsvr. If you started mongod with a --dbpath option, specify that as well.
mongod --shardsvr ...
Note that with --shardsvr specified the default port for mongod becomes 27018.
Start a mongo config server:
mongod --configsvr ...
Note: configuration server setup has changed. If you are using MongoDB 3.4 you must set up your configuration servers with CSRS. An example setup is as follows:
mongod --configsvr --replSet csReplSet ... mongod --configsvr --replSet csReplSet ... mongod --configsvr --replSet csReplSet ... mongo --port 27019 config = { _id: "csReplSet", members:[ { _id : 0, host : "localhost:27019" }, { _id : 1, host : "localhost:27020" }, { _id : 2, host : "localhost:27021" }]}; rs.initiate(config)
(Note with --configsvr specified the default port for listening becomes 27019 and the default data directory /data/configdb. Wherever your data directory is, it is suggested that you verify that the directory is empty before you begin.)
Start a mongos:
mongos --configdb your_host_name:27019
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/5dff7862-c497-4450-b6d4-0dc4a0908987%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/5dff7862-c497-4450-b6d4-0dc4a0908987%40googlegroups.com.