Skip to content

Instantly share code, notes, and snippets.

@daxxog
Last active December 11, 2015 14:38
Show Gist options
  • Save daxxog/4615060 to your computer and use it in GitHub Desktop.
Save daxxog/4615060 to your computer and use it in GitHub Desktop.
Install node
#!/bin/bash
#curl -L https://gist.githubusercontent.com/daxxog/4615060/raw/install-node.sh | sh
#get gcc toolchain
sudo apt-get update
sudo apt-get install make gcc g++ -y
#make a dev directory and switch to it
cd ~
mkdir dev
cd dev
VERSION=v0.12.7
#get node and build it
wget https://nodejs.org/dist/$VERSION/node-$VERSION.tar.gz
tar -xzvf node-$VERSION.tar.gz
cd node-*/
./configure
make -j6
sudo make install
#make sure node can run (hack)
cd ~
echo "alias node='/usr/local/bin/node'" >> '.bashrc'
echo "alias npm='/usr/local/bin/npm'" >> '.bashrc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment