-
-
Save matt-mcmahon/1888722 to your computer and use it in GitHub Desktop.
My procedure for installing node.js on ubuntu server.
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
# 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 |
Discovered a couple of other "bugs" in the script after installing node as the very first thing on Ubuntu 12.04 server.
- make, pkg-config were not installed by default, so they were added.
- 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
I frequently setup VMs for development, and like to have node installed for tooling, if nothing else. This gist is just a reminder of what I do to get node up and running. It's based on Isaacs' original gist, with some tweaks and additions to work on Ubuntu.