sudo service mongod start
if you the get error:
Error: Couldn't connect to server 127.0.0.1:27017
- Manually remove the lockfile:
-
sudo rm /var/lib/mongodb/mongod.lock restart permissions:sudo chown -R mongodb:mongodb /var/lib/mongodbStart the service:sudo service mongod startStart the shell:mongoYou can repair databases:- run the repair script:
sudo -u mongodb mongod -f /etc/mongod.conf --repairormongod --repair --dbpath /var/lib/mongodb
Service:
Start the service: sudo service mongod startStop the service: sudo service mongod stopRestart the service: sudo service mongod restart
No hay comentarios:
Publicar un comentario