Buscar

domingo, 23 de noviembre de 2014

Mongodb service

Start, Stop, Restart

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/mongodb
  • Start the service:  
    • sudo service mongod start
  • Start the shell: 
    • mongo 
  • You can repair databases:
    • run the repair script 
      • sudo -u mongodb mongod -f /etc/mongod.conf --repair
    • or
      • mongod --repair --dbpath /var/lib/mongodb 





Service:

  • Start the service: sudo service mongod start
  • Stop the service: sudo service mongod stop
  • Restart the service: sudo service mongod restart


 

No hay comentarios:

Publicar un comentario