使用yum方式安装:

第一步:

curl --silent --location https://rpm.nodesource.com/setup_16.x | sudo bash

第二步:

sudo yum -y install nodejs

如果以上步骤不能安装 最新版 node,执行以下命令后再执行第二步:

sudo yum clean all


如果存在多个 nodesoucre,执行以下命令删除,然后重新执行第一第二步:

sudo rm -fv /etc/yum.repos.d/nodesource*

查看 版本是否安装成功

node -v

 

安装pm2(nodejs 管理程序)

npm install pm2 -g

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-12-04
  • 2021-09-19
猜你喜欢
  • 2021-11-23
  • 2021-06-02
  • 2021-09-18
  • 2021-06-25
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案