Skip to content

Instantly share code, notes, and snippets.

@pounard
Last active November 30, 2015 11:20
Show Gist options
  • Save pounard/5dc545133c495fdebf3d to your computer and use it in GitHub Desktop.
Save pounard/5dc545133c495fdebf3d to your computer and use it in GitHub Desktop.
Install node js for your user, isolated, static, and working. This also installs gulp and I'm happy with it.
#!/bin/sh
# Thank you so much, mab!
cd $HOME
wget https://nodejs.org/dist/v4.1.1/node-v4.1.1-linux-x64.tar.gz
tar xzf node-v4.1.1-linux-x64.tar.gz
rm -rf node-v4.1.1-linux-x64.tar.gz
mv node-v4.1.1-linux-x64 node
export PATH="$PATH:$HOME/node/bin"
npm install gulp
export PATH="$PATH:$HOME/node_modules/.bin"
echo "export PATH=\"\$PATH:\$HOME/node/bin:\$HOME/node_modules/.bin\"" >> .bashrc
cd -
@vincentfretin
Copy link

I just read http://makina-corpus.com/blog/metier/2015/toi-aussi-installes-nodejs-dans-ton-home
With nvm, you can install several node versions. https://github.com/creationix/nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.28.0/install.sh | bash
nvm install node
echo "[[ -r \$NVM_DIR/bash_completion ]] && . \$NVM_DIR/bash_completion" >> .bashrc
nvm use stable
# Now using node v4.1.1 (npm v2.14.4)
npm install gulp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment