More Dry goodsReact starter (dry goods) distributed combat (dry goods) Spring cloud Combat (dry Goods) MyBatis Combat (Dry Goods) Spring boot Combat (dry goods) build small and medium sized Internet Enterprise Architecture (dry Goods)
Background Process running
Nohup
Which Nohup
. Bash_profile and source load
if not, install it
yum provides */nohup nohup
npm Start &
The standard output of the original program is automatically redirected to the Nohup.out file in the current directory, which plays the role of log.
Stop Program
Ps-ef | grep npm
Ps-ef | grep node
kill-9 10532
PM2Forever has gone out and severely recommended PM2 way to run Nodejs, which is the best, not one. Built-in load balancing (using the Node cluster cluster module) running 0-second downtime in the background, I understand the general meaning is that maintenance upgrades do not require downtime. Startup scripts with Ubuntu and CentOS stop unstable processes (avoid infinite loops) Console detection provides HTTP API remote control and real-time interface APIs (Nodejs modules, allowing interaction with PM2 process Manager) PM2 website HTTP://PM2.K eymetrics.io/
installation
Start Project
PM2 start:
pm2 start "/usr/local/src/node/bin/npm"--name "the"-start.
PM2 list
pm2 stop
pm2 restart
PM2 Delete