1. wget http://czweb.eduxxx.com/czfile/node-v8.11.4-linux-x64.tar.xz
2. mv node-v8.11.4-linux-x64.tar.xz node
3. echo $PATH 如果有/usr/local/bin则执行4,5 没有则执行6,7
4. ln -s /home/center/node/bin/node /usr/local/bin/node
5. ln -s /home/center/node/bin/npm /usr/local/bin/npm
6. ln -s /home/center/node/bin/node /usr/bin/node
7. ln -s /home/center/node/bin/npm /usr/bin/npm
npm config get prefix
安装pm2
1. cd /home/center/node/lib/node_modules/
2. wget http://czweb.eduxxx.com/czfile/pm2.tar.gz
3.tar -xvf pm2.tar.gz
4. echo $PATH 如果有/usr/local/bin则执行5 没有则执行6
5.ln -s /home/center/node/lib/node_modules/pm2/bin/pm2 /usr/local/bin/pm2
6.ln -s /home/center/node/lib/node_modules/pm2/bin/pm2 /usr/bin/pm2