Mongodb can't start

后端 未结 6 1109
暖寄归人
暖寄归人 2020-12-08 21:48

today I updated my Mongo.. mongodb-stable (from 10gen repo)

but my service has down. the following command not working

$ sudo service mongodb start
         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-08 21:52

    Running Ubuntu 11.10 confirm you have the latest version of MongoDB:

    $ mongod --version

    db version v2.2.0

    (If you don't have the latest version of MongoDB, follow the Ubuntu Installation instructions at: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/)

    First confirm that the mongodb user/group has permission to write to the data directory:

    $ sudo chown -R mongodb:mongodb /var/lib/mongodb/.

    Start up MongoDB as a Daemon (background process) using the following command:

    $ mongod --fork --dbpath /var/lib/mongodb/ --smallfiles --logpath /var/log/mongodb.log --logappend

    To Shut Down MongoDB enter the Mongo CLI, access the admin and issue the shutdown command:

    $ ./mongo

    > use admin

    > db.shutdownServer()

    See: http://www.mongodb.org/display/DOCS/Starting+and+Stopping+Mongo

提交回复
热议问题