Created
December 7, 2018 22:49
-
-
Save jeffschwartz/aa807d4c2499ca0251659c498a9fc252 to your computer and use it in GitHub Desktop.
install node without sudo and use without sudo on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSION=v10.1.14 | |
DISTRO=linux-x64 | |
mkdir ~/local | |
mkdir ~/local/lib | |
mkdir ~/local/lib/nodejs | |
tar -xJvf ~/Downloads/node-$VERSION-$DISTRO.tar.xz -C ~/local/lib/nodejs | |
mv ~/local/lib/nodejs/node-$VERSION-$DISTRO ~/local/lib/nodejs/node-$VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to use install-node.sh | |
1. download node installation *.tar/xz to the ~/Downloads folder | |
2. open a terminal | |
3. using Vim or Neovim, open the above script and set VERSION and DISTRO appropriately for the version of Node you are installing and save the file and exit the editor | |
4. from the command line, run the script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment