Skip to content

Instantly share code, notes, and snippets.

@waskito
Created October 23, 2014 05:42
Show Gist options
  • Save waskito/51f6766bcc9ca98c636b to your computer and use it in GitHub Desktop.
Save waskito/51f6766bcc9ca98c636b to your computer and use it in GitHub Desktop.
node and npm install without sudo
## make sure you use python2.x (recommended python2.7)
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
export JOBS=8 # optional, sets number of parallel commands.
./configure --prefix=$HOME/local
#configure --prefix=$HOME/local/node
make
make install # ok, fine, this step probably takes more than 30 seconds...
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
curl https://www.npmjs.org/install.sh | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment