Skip to content

Instantly share code, notes, and snippets.

@mk30
Last active June 9, 2017 08:59
Show Gist options
  • Save mk30/3fe1bf103da3d7828621b8c7413e6e8c to your computer and use it in GitHub Desktop.
Save mk30/3fe1bf103da3d7828621b8c7413e6e8c to your computer and use it in GitHub Desktop.
installing node.js 2
find the appropriate file for your system on https://nodejs.org/en/download/
(if you're not sure whether you should use 32-bit or 64-bit, follow instructions here: https://www.computerhope.com/issues/ch001121.htm)
copy the link to the appropriate file. in the example below we're using the link for the Linux 64-bit binary. if you're using a different file, substitute as necessary.
on the command line, do the following series of commands one at a time:
cd /tmp
wget https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-x64.tar.xz
tar -xf node-v6.10.3-linux-x64.tar.xz
sudo mv node-v6.10.3-linux-x64 /usr/local/nodejs
mkdir -p ~/prefix/{bin,lib}
npm config set prefix ~/prefix
echo 'export PATH=$HOME/prefix/bin:$PATH:/usr/local/nodejs/bin' >> ~/.bashrc
source ~/.bashrc
if on ubuntu: sudo ln -s "$(which nodejs)" /usr/local/bin/node`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment