Skip to content

Instantly share code, notes, and snippets.

@klzns
Last active November 18, 2015 16:05
Show Gist options
  • Save klzns/534729c806dc0d4ca917 to your computer and use it in GitHub Desktop.
Save klzns/534729c806dc0d4ca917 to your computer and use it in GitHub Desktop.
Node install instructions
#!/bin/bash
echo 'Installing node latest stable'
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=$HOME/local
make install
# Source our bash in order to have node at our path.
# Otherwise, the npm script will fail.
source $HOME/.bashrc
export PATH=$HOME/local/bin:$PATH
curl -L https://www.npmjs.org/install.sh | sh
echo ">>>"
echo ">>> Finished installing node latest stable."
echo ">>>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment