Skip to content

Instantly share code, notes, and snippets.

@apocas
Last active March 6, 2017 16:40
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apocas/f8889c32649e6a8f839d to your computer and use it in GitHub Desktop.
Save apocas/f8889c32649e6a8f839d to your computer and use it in GitHub Desktop.
Compiling Nodejs v4 in Centos 6
#!/bin/bash
#Nodejs v4.x needs gcc v4.8, Centos 6 comes with gcc v.4.4.
#devtools-2 comes already bundled with v4.8
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install -y devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
scl enable devtoolset-2 bash
wget https://nodejs.org/dist/latest/node-v4.0.0-linux-x64.tar.gz
tar -zxvf node-v4.0.0-linux-x64.tar.gz
cd node-v4.0.0-linux-x64
./configure
make
make install
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment