Last active
December 11, 2015 14:38
-
-
Save daxxog/4615060 to your computer and use it in GitHub Desktop.
Install node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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