Install Node.js from source on Centos RHEL and Fedora
suggest changePrerequisites
- git
clangandclang++3.4 or newer, orgccandg++4.8 or newer- Python 2.6 or 2.7 for the Node 6 and 7 branches below. Current Node needs Python 3.
- GNU Make 3.81 or newer
Get source
Node.js v6.x LTS
git clone -b v6.x https://github.com/nodejs/node.git
Node.js v7.x
git clone -b v7.x https://github.com/nodejs/node.git
Build
cd node
./configure
make -jX
su -c 'make install'
X - the number of processor cores, greatly speeds up the build
Cleanup [Optional]
cd ..
rm -rf node
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents