Node Pm2 configuration and nodepm2 Configuration

Source: Internet
Author: User

Node Pm2 configuration and nodepm2 Configuration

System Environment: Centos7

 

  • Step 1 install NodeJS

We recommend that you use stable compiled versions. The source code is a little complicated and can be directly used after compilation. The installation is super simple.

The download is successful.

Node-v displays the version number

Npm-v displays the installed version number

 

 

  • Step 2: Install PM2

 

Npm install pm2-g can be installed under normal circumstances/cannot be installed under abnormal circumstances

Normally, I see the http://www.jianshu.com/p/fdc12d82b661 on the book.

How to change the installation source of my centos is also a network failure, and then use windows to install pm2 to upload, but it is useless

So use mac to install pm2 and then upload it to the slightly add configuration on it. So almost I saw the blog on the http://www.cnblogs.com/Siege-lion/p/5765215.html

I downloaded bing, but it does not play any role. ERROR

Error: [PM2] Spawning PM2 daemon does not find a solution

In Linux, multiple pm2 processes are enabled, causing the server to become stuck.


Just package and upload pm2 for mac Download.

Add permissions to the directory: (add or package mac according to the actual situation. You do not need to perform this operation)

Chmod-R 777 node-v0.10.26-linux-x64

Add the quick execution command: you do not need to set NODE_PATH.

Ln-s/home/node-v0.10.26-linux-x64/bin/node/usr/local/bin/node

Ln-s/home/node-v0.10.26-linux-x64/bin/npm/usr/local/bin/npm

Ln-s/home/node-v0.10.26-linux-x64 // lib/node_modules/pm2/bin/pm2/usr/local/bin/pm2

 

 

Pm2 start./bin/www project started successfully

 

 

Pm2 attachment

 

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.