Last active
December 18, 2015 04:39
-
-
Save rishabhmhjn/5726530 to your computer and use it in GitHub Desktop.
Install nodejs using nvm
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
vi ~/.bashrc | |
# [add the following] | |
# ------------------------------------------------------------- | |
. ~/.nvm/nvm.sh && nvm use default | |
# ------------------------------------------------------------- | |
mkdir ~/src | |
cd !$ | |
wget -O nvm.zip https://github.com/creationix/nvm/zipball/master --no-check-certificate | |
unzip nvm.zip | |
ls -la | grep creationix-nvm | |
mv creationix-nvm-XXXXXX ~/.nvm ## fill in yourself | |
source ~/.bashrc | |
# check & install the desired version | http://nodejs.org/ | http://nodejs.org/dist/ | |
node_version=v0.10.15 | |
nvm install ${node_version} | |
node --version | |
# ------------------------------------------------------------- | |
# v0.10.15 | |
# ------------------------------------------------------------- | |
# check the installed versions | |
nvm ls | |
# defaulting | |
nvm alias default ${node_version} | |
nvm use default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment