转载:Mongodb start

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/

posted @ 2013-11-30 21:15  鍒樻爧  阅读(1115)  评论(0编辑  收藏  举报