Ubuntu 12.04 Server can install node JS using Apt-get mode, however, the version after installation is v0.6.12 version, if we want to use a new version of the following configuration:
Apt-get Install python-software-propertiesapt-add-repository ppa:chris-lea/node.jsapt-get updateapt-get Install Nodejs
After the installation is complete, you can check the version and use the following command to view:
[Email protected]: #node-vv0.10.28
Next we need to install PM2 this software
First we need to install a NPM software, the specific command is as follows:
Apt-get Install Npmnpm-v
When the installation is complete, we can install the PM2 software and install it using the following command:
[Email protected]:# npm install-g PM2
Enter PM in the shell, use table completion, if you can appear PM2, the installation is normal.
Main functions of PM2:
Main Features
Built-in load balancer (using the native cluster module)
Script daemonization
0s downtime reload for Node apps
Generate systemv/systemd Startup Scripts (Ubuntu, Centos ...)
Pause unstable process (avoid infinite loop)
Restart on file change with--watch
Monitoring in Console
PM2 Address: HTTPS://GITHUB.COM/UNITECH/PM2
This article is from the "wind of the Crane" blog, please be sure to keep this source http://addam.blog.51cto.com/5041993/1407087