Skip to content

Instantly share code, notes, and snippets.

@nimboya
Last active October 12, 2017 15:25
Show Gist options
  • Save nimboya/70f57caf3169431db09833017e189d58 to your computer and use it in GitHub Desktop.
Save nimboya/70f57caf3169431db09833017e189d58 to your computer and use it in GitHub Desktop.
Install nodejs in any version on an any Linux from Source
#!/bin/sh
nodeversion=6.9.4
echo "Downloading Node from NodeJS website"
wget https://nodejs.org/download/release/v${nodeversion}/node-v${nodeversion}.tar.gz
tar -xvf node-v${nodeversion}.tar.gz
yum groupinstall 'Development Tools' -y
cd node-v${nodeversion}
./configure
make && make install
echo "Giving Root Access"
export PATH=$PATH:/usr/local/bin/
cp node /usr/local/sbin
cp npm /usr/local/sbin
echo "Node Installed Successfully"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment