一.安装node,这里安装9.0的版本,安装其它版本直接到https://deb.nodesource.com/setup_9.x找相应版本的更改既可

1.sudo apt-get remove nodejs --purge

2.curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

3.sudo apt-get update

4.sudo apt-get install -y nodejs

5.node -v

6.npm -v

二.安装pm2,在node完成安装后执行以下命令:

npm install pm2 -g

 

posted on 2019-11-06 14:47  爱技术努力学技术  阅读(1964)  评论(0编辑  收藏  举报