Skip to content

Instantly share code, notes, and snippets.

@molsches
Created February 26, 2015 21:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save molsches/d4ec0c18794a069b1811 to your computer and use it in GitHub Desktop.
Save molsches/d4ec0c18794a069b1811 to your computer and use it in GitHub Desktop.
Building Node from source on Ubuntu
//Make a directory to hold the node
mkdir node-install-dir
cd node-install-dir
//Curl and unzip latest node
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
//Install gcc and g++
sudo apt-get update
sudo apt-get install make gcc g++ apache2
//Build Node (takes awhile)
sudo ./configure --prefix=/opt/node && sudo make && sudo make install
//Add node path to your sudoer and local bash ":/opt/node/bin"
sudo vim /etc/environment
sudo vim /etc/sudoers
//Install npm
sudo curl https://www.npmjs.com/install.sh |sudo sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment