【Node.js】

kingdelee發表於2019-08-05

npm安裝

下載路徑:
https://nodejs.org/en/download/

【npm】npm安裝與配置

安裝

建立並解壓至:
/usr/local/nodejs

ln -s /usr/local/nodejs/bin/npm /usr/local/bin/
ln -s /usr/local/nodejs/bin/node /usr/local/bin/

檢查:
node -v
npm -v

參考:
https://blog.csdn.net/bbwangj/article/deta...

pm2安裝

npm install -g pm2

pm2:[root@iZbp12ft4a1zgzzaoq9xgrZ nodejs]# npm install -g pm2
/usr/local/node-v10.16.1-linux-x64/bin/pm2 -> /usr/local/node-v10.16.1-linux-x64/lib/node_modules/pm2/bin/pm2
/usr/local/node-v10.16.1-linux-x64/bin/pm2-dev -> /usr/local/node-v10.16.1-linux-x64/lib/node_modules/pm2/bin/pm2-dev
/usr/local/node-v10.16.1-linux-x64/bin/pm2-docker -> /usr/local/node-v10.16.1-linux-x64/lib/node_modules/pm2/bin/pm2-docker
/usr/local/node-v10.16.1-linux-x64/bin/pm2-runtime -> /usr/local/node-v10.16.1-linux-x64/lib/node_modules/pm2/bin/pm2-runtime
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/pm2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ pm2@3.5.1
updated 1 package in 25.987s
ln -s /usr/local/node-v10.16.1-linux-x64/bin/pm2 /usr/bin/pm2
本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章