站点图标 南猫

nodejs一键安装脚本

Debian & Ubuntu

Node.js v14.x:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs




Node.js v12.x:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs

Node.js v10.x:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs

其他企业Linux发行版

目前支持:

请于root模式下运行以下指令

NodeJS 14.x

# As root
curl -sL https://rpm.nodesource.com/setup_14.x | bash -

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

NodeJS 12.x

# As root
curl -sL https://rpm.nodesource.com/setup_12.x | bash -

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

NodeJS 10.x

# As root
curl -sL https://rpm.nodesource.com/setup_10.x | bash -

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

项目开源地址:https://github.com/nodesource/distributions