Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save matt-mcmahon/1888722 to your computer and use it in GitHub Desktop.
Save matt-mcmahon/1888722 to your computer and use it in GitHub Desktop.
My procedure for installing node.js on ubuntu server.
# Prerequisites:
sudo apt-get install g++ make libssl-dev git-core pkg-config
# pkg-config: is needed so that configure will be able to verify that openssl is
# installed.
# curl: is handy, but not needed for node.js to work.
# Install into user-specific local bin:
mkdir ~/local
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
# Download Source for Node
mkdir ~/src
cd ~/src
git clone https://github.com/nodejs/node.git
# Install Node:
cd ~/src/node
git checkout v6.3.0 #or latest stable version
./configure --prefix=~/local
make install
@matt-mcmahon
Copy link
Author

Discovered a couple of other "bugs" in the script after installing node as the very first thing on Ubuntu 12.04 server.

  1. make, pkg-config were not installed by default, so they were added.
  2. Added a note to checkout the latest stable version, and not just what's in the repo at the time of the pull (which isn't always stable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment