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/

相关文章:

  • 2021-04-18
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2022-01-29
  • 2021-10-16
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
相关资源
相似解决方案