# npm install -g pm2
npm WARN optional dep failed, continuing fsevents@1.0.2
/usr/local/software/node-v4.2.1-linux-x86/bin/pm2 -> /usr/local/software/node-v4.2.1-linux-x86/lib/node_modules/pm2/bin/pm2
/usr/local/software/node-v4.2.1-linux-x86/bin/pm2-dev -> /usr/local/software/node-v4.2.1-linux-x86/lib/node_modules/pm2/bin/pm2-dev
pm2@0.15.7 /usr/local/software/node-v4.2.1-linux-x86/lib/node_modules/pm2
?..? ikt@0.0.0
?..? eventemitter2@0.4.14
?..? async@1.4.2
?..? isbinaryfile@2.0.4
?..? semver@5.0.3
?..? pidusage@0.1.1
?..? safe-clone-deep@1.0.5
?..? commander@2.8.1 (graceful-readlink@1.0.1)
?..? debug@2.2.0 (ms@0.7.1)
?..? coffee-script@1.9.3
?..? chalk@1.1.1 (escape-string-regexp@1.0.3, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
?..? pm2-deploy@0.2.1 (tv4@1.0.18)
?..? pm2-multimeter@0.1.2 (charm@0.1.2)
?..? vizion@0.2.11 (async@0.9.0)
?..? cli-table@0.3.1 (colors@1.0.3)
?..? shelljs@0.5.3
?..? pm2-axon-rpc@0.3.6 (json-stringify-safe@5.0.1, commander@1.0.5)
?..? mkdirp@0.5.1 (minimist@0.0.8)
?..? nssocket@0.5.3 (lazy@1.0.11)
?..? cron@1.0.9 (moment-timezone@0.3.1)
?..? blessed@0.1.61
?..? pm2-axon@2.0.8 (amp-message@0.1.2, escape-regexp@0.0.1, amp@0.3.1, configurable@0.0.1, debug@2.0.0)
?..? pmx@0.5.5 (json-stringify-safe@5.0.1)
?..? chokidar@1.1.0 (arrify@1.0.0, path-is-absolute@1.0.0, async-each@0.1.6, glob-parent@2.0.0, is-binary-path@1.0.1, is-glob@2.0.1, readdirp@2.0.0, anymatch@1.3.0)
?..? moment@2.10.6
然后 输入指令: mp2
-bash: pm2: command not found
求指教!
PS: 使用 PM2 是用来实现 Node.js 程序永久后台
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.