Skip to content

Instantly share code, notes, and snippets.

@muhammadghazali
Created October 29, 2011 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muhammadghazali/1324363 to your computer and use it in GitHub Desktop.
Save muhammadghazali/1324363 to your computer and use it in GitHub Desktop.
Node.js installation script for Ubuntu Linux. This installation script is already tried on my Ubuntu 11.04 Linux Box.
# The official wiki page for Building and Installing Node.js
# https://github.com/joyent/node/wiki/Installation
# Update the system
echo 'Update the system'
sudo apt-get -y udpate
echo 'System updated'
# Install the dependencies packages
echo 'Install the dependencies packages'
sudo apt-get install g++
sudo apt-get install curl
sudo apt-get install libssl-dev
sudo apt-get install apache2-utils
sudo apt-get install git-core
sudo apt-get install pkg-config
sudo apt-get install build-essential
echo 'The dependencies packages installed'
# Building the Node.js from sources
echo 'Building from Node.js from sources'
git clone git://github.com/joyent/node.git
cd node
./configure
make
sudo make install
echo 'export NODE_PATH=/opt/node:/opt/node/lib/node_modules' >> ~/.profile # ~/.bash_profile or ~/.bashrc on some systems
echo 'export PATH=$PATH:/opt/node/bin' >> ~/.profile # ~/.bash_profile or ~/.bashrc on some systems
echo 'Node.js installed'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment