-
-
Save hahmeed237-lab/fb95bde05e2a978d5ef7ce2685886dc4 to your computer and use it in GitHub Desktop.
bash <(curl -# -L https://gist.github.com/amercier/8825661/raw)
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
| #!/usr/bin/env bash | |
| if [ "`whoami`" != "root" ]; then | |
| echo "You must execute this script as root" >&2 | |
| exit 1 | |
| fi | |
| echo ".----------------------." | |
| echo "| node.js installation |" | |
| echo "'----------------------'" | |
| VERSION=v0.10.32 | |
| cd \ | |
| && (which aptitude > /dev/null 2>&1 && aptitude install curl python g++ make || exit 0) \ | |
| && (which yum > /dev/null 2>&1 && yum install curl python g++ make || exit 0) \ | |
| && curl -# http://nodejs.org/dist/$VERSION/node-$VERSION.tar.gz -o node-$VERSION.tar.gz \ | |
| && tar xzvf node-$VERSION.tar.gz \ | |
| && cd node-v* \ | |
| && ./configure \ | |
| && make install \ | |
| && cd \ | |
| && rm -Rf node-latest.tar.gz node-v* \ | |
| && echo '#!/usr/bin/env bash | |
| export PATH=$PATH:/usr/local/lib/node_modules' > /etc/profile.d/node.sh \ | |
| && . /etc/profile.d/node.sh \ | |
| && echo ".--------------------------------." \ | |
| && echo "| node.js installed successfully |" \ | |
| && echo "'--------------------------------'" \ | |
| && echo node $(node --version) \ | |
| && echo npm $(npm --version) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment