Skip to content

Instantly share code, notes, and snippets.

@jstott
Created September 13, 2013 15:26
Show Gist options
  • Save jstott/6552174 to your computer and use it in GitHub Desktop.
Save jstott/6552174 to your computer and use it in GitHub Desktop.
Install script for node (Ubuntu bash shell)
#!/bin/bash
# Install nodejs.
#
# Usage: sudo ./node-install.sh
#
# By Jim Stott
#
# Tested on Ubuntu 13.04
# Created at: 2013-09-09
#
if [[ $EUID -ne 0 ]]; then
echo "To run this script you need to be root (or use sudo)" 2>&1
exit 1
fi
echo "-> apt-get update"
apt-get update
echo "-> install phython"
apt-get -y install python-software-properties python g++ make
echo "-> add apt repository for node"
add-apt-repository ppa:chris-lea/node.js
echo "-> update and upgrade"
apt-get update
apt-get -y upgrade
echo "-> install node"
apt-get -y install nodejs
echo "-> all done - next line should show latest version of node"
node --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment