Forked from isaacs/node-and-npm-in-30-seconds.sh
Last active
January 8, 2016 18:07
-
-
Save kyeotic/7324aaa515ade384cb1c to your computer and use it in GitHub Desktop.
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
This file contains hidden or 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
#curl https://gist.githubusercontent.com/tyrsius/7324aaa515ade384cb1c/raw/927e4cd87d54a64c7a4ffc3b14739e5437346c35/node-and-npm-in-30-seconds.sh | sh | |
#echo 'export PATH=$PATH:$HOME/bin/node/bin' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir bin -p | |
cd ~/bin | |
mkdir node -p | |
rm -rf install-node | |
mkdir install-node -p | |
cd install-node | |
curl https://nodejs.org/dist/v4.2.0/node-v4.2.0.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/bin/node | |
make install | |
curl https://raw.githubusercontent.com/npm/npm/master/scripts/install.sh | sh | |
cd ~/bin | |
rm -rf install-node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment