Skip to content

Instantly share code, notes, and snippets.

@sseltzer
Last active December 23, 2016 06:54
Show Gist options
  • Save sseltzer/72589db1be80064db4e533a2b22640c6 to your computer and use it in GitHub Desktop.
Save sseltzer/72589db1be80064db4e533a2b22640c6 to your computer and use it in GitHub Desktop.
Install node.js
# Check arm versions: https://gist.github.com/sseltzer/c589400ab2cf6a7c862deb37b8465f0a
# Check latest node.js version, and grab the DL link: https://nodejs.org/en/download/current/
# dl file
mkdir -p ~/development/download
cd ~/development/download
wget https://nodejs.org/dist/v7.3.0/node-v7.3.0-linux-armv7l.tar.xz
tar xvf node-v7.3.0-linux-armv7l.tar.xz
# set symbolic links
#TODO
#Or use NVM: https://github.com/creationix/nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# Make sure to add the last two lines to the end of .zshrc if using it
nvm install node
nvm use node
nvm --version
# 0.32.1
npm --version
# 3.10.10
node --version
# v7.3.0
ll ~/.nvm/versions/node/v7.3.0/bin/
sudo ln -s ~/.nvm/versions/node/v7.3.0/bin/ /opt/node_globals
PATH=/opt/node_globals:$PATH
# add this to .rc ie, ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment