Skip to content

Instantly share code, notes, and snippets.

@neatshell
Last active August 29, 2015 13:56
Show Gist options
  • Save neatshell/9288283 to your computer and use it in GitHub Desktop.
Save neatshell/9288283 to your computer and use it in GitHub Desktop.
Install script for node.js on linux
#!/bin/bash
cat << 'EOF' >> ~/.npmrc
root = $HOME/.local/lib/node_modules
binroot = $HOME/.local/bin
manroot = $HOME/.local/share/man
EOF
mkdir -p ~/.local
git clone git://github.com/joyent/node.git
cd node
./configure --prefix=$HOME/.local
make install
cd
rm -R node/
ln -s .local/lib/node_modules .node_modules
echo "export PATH=\"\$HOME/.local/bin:\${PATH}\"" >> ~/.bash_profile
. ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment