MongoDB Service Will Not Start After Initial Setup

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

    This worked for me in Ubuntu:

    sudo kill $(sudo lsof -t -i:27017) 
    sudo rm -rf /tmp/mongodb-27017.sock
    sudo rm -f /var/lib/mongo/mongod.lock
    sudo rm -f /var/run/mongodb/mongod.pid
    sudo mkdir -p  /var/run/mongodb/
    sudo touch /var/run/mongodb/mongod.pid
    sudo chown -R  mongodb:mongodb /var/run/mongodb/
    sudo chown mongodb:mongodb /var/run/mongodb/mongod.pid
    sudo service mongod start
    

提交回复
热议问题