MongoDB Service Will Not Start After Initial Setup

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

    What worked for me on Fedora 20: we need to create the temp dir on every boot, and that's handled by systemd-tmpfiles. So, create a file /lib/tmpfiles.d/mongodb.conf and put one line in it:

    d /var/run/mongodb 0755 mongod mongod
    

    That seems to handle it on restarts; if you don't want to restart right away, you can execute that with:

    sudo systemd-tmpfiles --create mongodb.conf
    

    (See the man pages for systemd-tmpfiles)

提交回复
热议问题