Mongodb 操作
Start MongoDB
The MongoDB instance stores its data files in the /var/lib/mongo and its log files in /var/log/mongo, and run using themongod user account. If you change the user that runs the MongoDB process, you must modify the access control rights to the/var/lib/mongo and /var/log/mongo directories.
Start the mongod process by issuing the following command (as root or with sudo):
service mongod start
You can verify that the mongod process has started successfully by checking the contents of the log file at/var/log/mongo/mongod.log.
You may optionally ensure that MongoDB will start following a system reboot by issuing the following command (with root privileges:)
chkconfig mongod on
Stop MongoDB
Stop the mongod process by issuing the following command (as root or with sudo):
service mongod stop
Restart MongoDB
You can restart the mongod process by issuing the following command (as root or with sudo):
service mongod restart
url:http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/