Mongo DB installation
15, September 2012
The following command to install the latest stable version of MongoDB:
$ sudo apt-get install mongodb-10genWhen this command completes, you have successfully installed MongoDB! Continue for configuration and start-up suggestions.
Starting MongoDB
Upstart users can start the mongod process by issuing the following command:
$ sudo service mongodb startAll other users can issue the following command to start mongod:
$ sudo /etc/init.d/mongodb startYou can verify that mongod has started successfully by checking the contents of the log file at /var/log/mongodb/mongodb.log
Stopping MongoDB
Upstart users can stop the mongod process by issuing the following command:
$ sudo service mongodb stopAll other users can issue the following command to stop mongod:
$ sudo /etc/init.d/mongodb stopRestarting MongoDB
Upstart users can restart the mongod process by issuing the following command:
$ sudo service mongodb restartAll other users can issue the following command to restart mongod:
$ sudo /etc/init.d/mongodb restarttype “mongo” in your terminal to see the version