centos yum install nodejs

使用命令安装nodejs

Run on RHEL, CentOS, CloudLinux, Amazon Linux or Fedora:

Node.js v17.x

# As root
curl -fsSL https://rpm.nodesource.com/setup_17.x | bash -

# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_17.x | sudo bash -

Node.js v16.x

# As root
curl -fsSL https://rpm.nodesource.com/setup_16.x | bash -

# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash -

你可能感兴趣的