MongoDB Service Will Not Start After Initial Setup

前端 未结 11 1770
夕颜
夕颜 2021-01-31 12:11

I am running Fedora 20 and installed MongoDB per the Red Hat installation guide on the official documentation. I was able to run the mongod daemon as a service with

11条回答
  •  花落未央
    2021-01-31 12:13

    I've spent a while looking into this, and it appears as if the pid folder and file permissions don't work with the default daemon.

    The simplest solution I've come across is disable the pid file by just putting a # in front of the line in the config file.

    vi /etc/mongod.conf
    

    find the line that says pidfilepath=/var/run/mongodb/mongod.pid and change it accordingly.

    # pidfilepath=/var/run/mongodb/mongod.pid
    

    For information on what commenting it out does check here. http://docs.mongodb.org/manual/reference/configuration-options/#processManagement.pidFilePath

提交回复
热议问题