Created
March 15, 2012 11:05
-
-
Save tralamazza/2043678 to your computer and use it in GitHub Desktop.
nodejs (debian) installer/bootstrap
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
| #!/bin/sh | |
| # $1 nodejs version, e.g. "0.6.12" | |
| sudo apt-get install -y libssl-dev g++ | |
| if [ ! -d "node-v$1" ]; then | |
| # download + extract | |
| curl http://nodejs.org/dist/v$1/node-v$1.tar.gz | tar xzf - | |
| fi | |
| # make install | |
| cd node-v$1 && ./configure && make -j && sudo make install | |
| # clean | |
| rm -rf node-v$1 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl http://npmjs.org/install.sh | sudo sh sudo npm install n -gThis install npm and n. Subsequent nodejs versions can simply be installed using:
sudo n stable