標籤:ubuntu nodejs pm2
ubuntu 12.04伺服器可以使用apt-get方式安裝Node JS,但是,安裝完後的版本為v0.6.12的版本,如果我們想要使用新一點的版本需要做如下配置:
apt-get install python-software-propertiesapt-add-repository ppa:chris-lea/node.jsapt-get updateapt-get install nodejs
安裝完成後可以檢查一下版本,使用如下命令可以查看:
[email protected]:#node -vv0.10.28
接下來我們需要安裝pm2這個軟體
首先我們需要安裝一個npm的軟體,具體命令如下:
apt-get install npmnpm -v
安裝完成,我們就可以安裝pm2這個軟體,使用如下命令安裝:
[email protected]:# 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
PM2地址:https://github.com/Unitech/pm2
本文出自 “風之別鶴” 部落格,請務必保留此出處http://addam.blog.51cto.com/5041993/1407087