MongoDB Service Will Not Start After Initial Setup

前端 未结 11 1773
夕颜
夕颜 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:37

    I was having the same problem running mongodb 3.0.4 on OpenSuse 13.2, and I found that the mongod directory under /var/run was missing. If I created the directory manually it would disappear after a reboot.

    I solved it by adding the following lines to my /etc/init.d/mongod startup script:

    mkdir -p /var/run/mongod  
    chown $MONGO_USER:$MONGO_GROUP /var/run/mongod
    

提交回复
热议问题