mongodb service is not starting up

前端 未结 21 686
野的像风
野的像风 2020-12-02 05:16

I\'ve installed the mongodb 2.0.3, using the mongodb-10gen debian package. Everything went well, except the service which is installed by default is not starting up when com

21条回答
  •  独厮守ぢ
    2020-12-02 05:33

    1 - disable fork option in /etc/mongodb.conf if enabled

    2 - Repair your database

    mongod --repair --dbpath DBPATH
    

    3 - kill current mongod process

    Find mongo processes

    ps -ef | grep mongo
    

    you'll get mongod PID

    mongodb   PID     1  0 06:26 ?        00:00:00 /usr/bin/mongod --config /etc/mongodb.conf
    

    Stop current mongod process

    kill -9 PID
    

    4 - start mongoDB service

    service mongodb start
    

提交回复
热议问题