Start and restart
-
pm2 list
to check the status of servers and the serverid
. -
pm2 restart server_id
to 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