Hi all,
I've been searching on the web and on this group, but I don't see an exact answer to the following question.
How can I make mongos and mongod restart automatically if a server is rebooted?
Here's my mongos command:
mongos --fork --logpath /var/log/mongo/mongod.log --configdb mongo01:27019,mongo02:27019,mongo03:27019
And my mongod command varies per server. If it's one of the servers with config, I run these two commands:
mongod --rest --fork --logpath /var/log/mongo/mongod.log --replSet stgshard1/mongo02:27017
mongod --fork --logpath /var/log/mongo/configd.log --configsvr
If it's a server without a config, I'll run:
mongod --rest --fork --logpath /var/log/mongo/mongod.log --replSet shard3/mongo06:27017
I know there's a config file that you can setup so that I can potentially run:
chckconfig mongod on
But not sure if that will work with mongos.
My servers run Red Hat Enterprise Linux 5.5.
Any help is appreciated.