參考網(wǎng)址:https://github.com/nodesource/distributions
1、Ubuntu下安裝
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
2、Using Debian, as root下安裝
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs
3、RHEL 6 or CentOS 6 下安裝
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
sudo yum install -y nodejs
要從npm編譯和安裝本機(jī)插件,您可能還需要安裝構(gòu)建工具:
yum install gcc-c++ make
# or: yum groupinstall 'Development Tools'