When running mongo on a remote aws server (ubuntu) what is the best way to keep a mongo instance running after sshing to it to start it?
Take a look here. In short, you should use mongod --fork --logpath /var/log/mongod.log
Start it as a service. Here's the command
sudo service mongod start
You should be able to use the auto-generated init script if you installed the -10gen distro: http://www.mkyong.com/mongodb/how-to-install-mongodb-on-ubuntu/
You can use screen
too for this purpose.
First execute the command
screen
Then run your server using
mongod --dbpath=/example/dbpath
Then detach it by pressing ctrl+a and then pressing d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With