Skip to content

Instantly share code, notes, and snippets.

@kerasai
Last active September 5, 2019 17:28
Show Gist options
  • Save kerasai/fb17cd1f567fa064f134d2de2a9ba140 to your computer and use it in GitHub Desktop.
Save kerasai/fb17cd1f567fa064f134d2de2a9ba140 to your computer and use it in GitHub Desktop.
Install Node
#!/usr/bin/env bash
# USE NVM instead https://github.com/nvm-sh/nvm.
set -e
cd /tmp
curl -O https://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.xz
tar xf node-v10.15.1-linux-x64.tar.xz
rm node-v10.15.1-linux-x64.tar.xz
mkdir -p /opt
mv node-v10.15.1-linux-x64 /opt/
update-alternatives --install /usr/bin/npm npm /opt/node-v10.15.1-linux-x64/bin/npm 10
update-alternatives --install /usr/bin/node node /opt/node-v10.15.1-linux-x64/bin/node 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment