Start and restart
-
pm2 listto check the status of servers and the serverid. -
pm2 restart server_idto restart server
Database command
-
database path variable is set into
~/.bashrc, add here:
export PATH=<mongodb-install-directory>/bin:$PATH
-
error :
Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly
solution:
(sudo locale-gen) export LC_ALL=C mongo
-
start mongod :
sudo service mongod start