Install Nodejs and PM2 under Ubuntu

Source: Internet
Author: User
Tags install node

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

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.