轉載:Mongodb start

Mongodb 操做linux

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.mongodb

Start the mongod process by issuing the following command (as root or with sudo):centos

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.ui

You may optionally ensure that MongoDB will start following a system reboot by issuing the following command (with root privileges:)url

chkconfig mongod on

Stop MongoDB

Stop the mongod process by issuing the following command (as root or with sudo):spa

service mongod stop

Restart MongoDB

You can restart the mongod process by issuing the following command (as root or with sudo):rest

service mongod restart

 

 url:http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/get

相關文章
相關標籤/搜索