Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Setting up a Development Environment

James Hughes edited this page Jun 6, 2013 · 15 revisions

Prerequisites

There are a few initial runtimes/environments that need to be available if you are setting up a standalone environment. This guide assumes we are setting this up on an Ubuntu box, other platforms will work but you'll need to adjust the scripts below

  • Java JDK (v1.6+) - Required for backend/admin systems and migrator script
  • Ruby (~v1.9.3) & Gem & Bundler - Required for middleman and world-bank migrator scraprer
  • NodeJS (v0.8) & NPM - Required for Tilestream (map serving) Optional

The libraries/tools that need installed on top (or alongside) of these runtimes include,

  • MongoDB (v2.4+) - Stores aggregated data for building the site, may be going awaya
  • Tilestream - NodeJS based Map Tile Server for Country Projects page
  • Middleman - Ruby program for static site generation

Setting up a new environment

First things first we need to get the base OS into a good shape for doing our stuff. This means updating apt-get and adding new repositories

# update apt-get catalog
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
 
# install baseline tools
sudo apt-get -y install curl build-essential openssl libssl-dev git-core unzip openjdk-6-jdk zlib1g-dev libopenssl-ruby1.9.1 libruby1.9.1 libreadline-dev libsqlite3-0 libsqlite3-dev python-software-properties git apache2 libapache2-mod-proxy-html
 
# install mongodb
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
sudo apt-get update
sudo apt-get -y install mongodb-10gen=2.4.3
echo "mongodb-10gen hold" | dpkg --set-selections