Chinaunix首页 | 论坛 | 博客
  • 博客访问: 109756
  • 博文数量: 26
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 344
  • 用 户 组: 普通用户
  • 注册时间: 2013-07-21 23:11
文章分类
文章存档

2014年(23)

2013年(3)

分类: 网络与安全

2014-05-08 20:32:38

ubuntu 12.04服务器可以使用apt-get方式安装Node JS,但是,安装完后的版本为v0.6.12的版本,如果我们想要使用新一点的版本需要做如下配置:

apt-get install python-software-properties
apt-add-repository ppa:chris-lea/node.js
apt-get update
apt-get install nodejs

安装完成后可以检查一下版本,使用如下命令可以查看:
  
root@test:#node -v
v0.10.28

 接下来我们需要安装pm2这个软件

 首先我们需要安装一个npm的软件,具体命令如下:

   
apt-get install npm
npm -v

安装完成,我们就可以安装pm2这个软件,使用如下命令安装:
    
root@test:# npm install -g pm2

在shell中输入pm,使用table补全,如果能出现pm2,说明已经正常安装。

 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
阅读(4950) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~