Skip to content

Instantly share code, notes, and snippets.

@touv
Created August 31, 2011 10:04
Show Gist options
  • Save touv/1183220 to your computer and use it in GitHub Desktop.
Save touv/1183220 to your computer and use it in GitHub Desktop.
Installing NODEJS in HOME Directory with STOW
#!/bin/sh
#Installing NODEJS in HOME Directory with STOW
export NODEJS_VERSION=0.4.11
mkdir -p ~/local/lib/node_modules
cd ~/local/src
curl http://nodejs.org/dist/node-v${NODEJS_VERSION}.tar.gz | tar -xzf -
cd ~/local/src/node-v${NODEJS_VERSION}
./configure --prefix=~/local/stow/node-${NODEJS_VERSION}
make
make install
# Careful, check if stow is installed
cd ~/local/stow
stow node-${NODEJS_VERSION}
echo "export NODE_PATH=\$HOME/local:\$HOME/local/lib/node_modules" >> ~/.bash_profile
source ~/.bash_profile
cd ~
node -v
# END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment