Skip to content

Installing Postgres, NodeJS, and PhantomJS

Ahmed Gaber edited this page Jan 31, 2014 · 1 revision

We are using Postgres as a database management system, and PhantomJS as a part of testing the javascript application. In this document you will find the instructions for installing them besides NodeJS.

####Table of contents:

##For OS-X users: This is very easy using Homebrew, Homebrew is the best package manager out there for OS X.

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

###Install Postgres:

brew install postgresql

###Install NodeJS:

brew install nodejs

###Install PhantomJS

brew update && brew install phantomjs

##For Ubuntu users:

###Install Postgres: Ubuntu includes PostgreSQL by default. To install PostgreSQL on Ubuntu just type this command:

$ sudo apt-get install postgresql-9.3

You can find more useful information here.

###Install NodeJS: Follow these instructions:

$ sudo apt-get install python-software-properties python g++ make
$ sudo add-apt-repository ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install nodejs

Or if you're using a different Linux distribution, you can follow the instructions given here.

###Install PhantomJS Use wget to fetch the correct package from here.

For example, if you're using a 64-bit architecture:

$ wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2
$ tar xvjf phantomjs-1.9.2-linux-x86_64.tar.bz2
$ cd phantomjs-1.9.2-linux-x86_64
$ ln -sf `pwd`/bin/phantomjs /usr/local/bin/phantomjs

##For Windows users: Windows.. easy, sometimes tricky!.

###Install Postgres: Download the installer from here, install it, done!.

###Install NodeJS: Just like Postgres, you can easily download the installer from here.

###Install PhantomJS: Well, installing Phantom on Windows is a little tricky. But you can just follow these steps and everything will go well..

  1. Download the zip file from [here](http://phantomjs.org/download.html.
  2. Unzip it to any location. For example C:\phantomjs.
  3. Add ;C:\phantomjs\bin (or the correct path if you unzipped somewhere different) to the end of your PATH environment variable (you can find your environment variable following these steps).
Clone this wiki locally