Skip to content

Instantly share code, notes, and snippets.

@koy1619
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koy1619/3479170a3a763ffd8869 to your computer and use it in GitHub Desktop.
Save koy1619/3479170a3a763ffd8869 to your computer and use it in GitHub Desktop.
#!/bin/bash
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28-linux-x64.tar.gz
tar xzf node-v0.10.28-linux-x64.tar.gz
mv node-v0.10.28-linux-x64 /usr/local/
echo "PATH=$PATH:/usr/local/node-v0.10.28-linux-x64/bin" >> /etc/profile
echo "export PATH" >> /etc/profile
source /etc/profile
cp /usr/local/node-v0.10.28-linux-x64/bin/node /usr/bin
cp /usr/local/node-v0.10.28-linux-x64/bin/npm /usr/bin
node -v
npm -v
# cat /root/.npmrc
registry = https://registry.npm.taobao.org/
strict-ssl = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment