Skip to content

Instantly share code, notes, and snippets.

@hm0429
Created March 10, 2018 07:25
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 hm0429/a1c55753a22cd918161e08dc971ec545 to your computer and use it in GitHub Desktop.
Save hm0429/a1c55753a22cd918161e08dc971ec545 to your computer and use it in GitHub Desktop.
cat > install_node.sh <<EOF
#!/bin/sh
sudo apt-get install -y nodejs npm
sudo npm cache clean
sudo npm install n -g
sudo n stable
sudo ln -sf /usr/local/bin/node /usr/bin/node
sudo ln -sf /usr/local/bin/npm /usr/bin/npm
sudo apt-get purge -y nodejs npm
EOF
@hm0429
Copy link
Author

hm0429 commented Mar 10, 2018

chmod 755 install_node.sh
./install_node.sh

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