Last active
January 29, 2016 13:20
-
-
Save johhansantana/46c9bb977d5775df1516 to your computer and use it in GitHub Desktop.
install node and npm
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
vim ~/.bashrc | |
make sure in your bashrc file you have the following: | |
export PATH=$HOME/local/bin:$PATH | |
export PATH="$PATH:$HOME/npm/bin" | |
# this one is optional, add it it doesn't work at the end | |
export NODE_PATH="$NODE_PATH:$HOME/npm/lib/node_modules" |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local or ./configure --prefix=$HOME/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl -L https://www.npmjs.com/install.sh | sh | |
#source https://gist.github.com/isaacs/579814 and http://stackoverflow.com/questions/31025159/installing-nodejs-without-sudo-in-ubuntu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment