Last active
December 19, 2015 04:28
-
-
Save itsjustcon/5896892 to your computer and use it in GitHub Desktop.
Easy script for installing Node.js! Tested on Amazon's Ubuntu Server AMI
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
#!/bin/sh | |
# Author: Connor Grady (connorgrady.com) | |
# USAGE: sudo sh node-install.sh | |
version='v0.10.21' # check nodejs.org for this | |
echo 'INSTALLER: Welcome to the Node.js easy installer for Ubuntu. Going through first round of updates + installs...' | |
start_time=`date +%s` | |
sudo apt-get update -y | |
sudo apt-get install build-essential g++ curl apache2-utils git-core -y | |
echo 'INSTALLER: General installs complete, getting Node.js source...' | |
git clone https://github.com/joyent/node.git node-src | |
cd node-src | |
git checkout $version | |
echo "INSTALLER: Building Node.js $version this will take a while... (about 15-30 minutes)" | |
./configure && make && sudo make install | |
echo 'INSTALLER: Build complete!' | |
echo 'INSTALLER: Cleaning up...' | |
cd ../ | |
sudo rm -r node-src | |
clear | |
end_time=`date +%s` | |
echo 'INSTALLER: Completed Node.js install in' `expr $end_time - $start_time` 'seconds!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment