Linux NPM start background run __linux

Source: Internet
Author: User
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  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.