Installing Node.js Over Several Linux distributions | Linux Administration
Debian and Ubuntu-based Linux distributions
Also including Linux Mint, Linux Mint Debian Edition (LMDE), elementaryOS, bash on Windows and others.
For Node.js 6:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install -y nodejs
Alternatively, for Node.js 8:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
Optional: install build tools
Build tools are used to compile and install native add-ons from npm
sudo apt-get install -y build-essential
Enterprise Linux and Fedora
Including Red Hat® Enterprise Linux® / RHEL, CentOS, and Fedora.
Run as root on RHEL, CentOS or Fedora, for Node.js v6 LTS:
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
Alternatively for Node.js 8:
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
Alternatively for Node.js 0.10:
curl --silent --location https://rpm.nodesource.com/setup | bash -
Then install, as root:
yum -y install nodejs
Optional: install build tools
Build tools are used to compile and install native addons from npm
yum install gcc-c++ make # or: yum groupinstall 'Development Tools'
Alternatives
Official Fedora Node.js and npm packages are available in Fedora 18 and later. Install with:
sudo dnf install nodejs
Enterprise Linux (RHEL and CentOS) users may use the Node.js and npm packages from the EPEL repository.
Install the appropriate epel-release RPM for your version (found on the EPEL repository homepage), then run:
sudo yum install nodejs npm --enablerepo=epel
For detailed description, see the official documentation released by Node.js Organisation
Recent Comments