Skip to content
gboule35 edited this page Sep 14, 2015 · 4 revisions

Note i did this off the top of my head after getting it working, there could be a typo so if something doesn't work then help fix this up

Requirements

To get started with DemocracyOS, you will need to have installed:

MongoDB open-source document database.

  1. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
  2. echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
  3. sudo apt-get update
  4. sudo apt-get install -y mongodb-org
  5. sudo mkdir /data/db (just in case your mongo install didn't create this folder)
  6. sudo chown enteryourusername /data/db -R (change the permissions so you can write to it, your username by default is right there in the terminal before the @ symbol)

NodeJS & NPM platform.

  1. sudo apt-get install nodejs npm (This should be fine as long as you don't have the other node package, if you run into issues install node-legacy )
  2. sudo ln -s /usr/bin/nodejs /usr/bin/node (sets up a symbolic link so make finds node)

Git distributed version control system to get

  1. sudo apt-get install git
  2. The Lynda GIT tutorials are pretty good if you don't know how this works

Make build automation utility.

  1. sudo apt-get install make

OpenSSL in case you want to generate SSL certificates.

Git Ready

When our system builds it grabs a large number of different dependencies from GitHub, unfortunately GitHub only allows you to grab 60 an hour as an anonymous guest (but 5000 if you are a user).

  1. If you don't have an account you will need to create one
  2. Then generate an application token with the same name as your github username. Keep a copy of the string generated or you'll have to repeat this step.
  3. sudo gedit ~/.bashrc
  4. Add the following to the bottom of the file:

export GITHUB_USERNAME="yourgithubusername"

export GITHUB_PASSWORD="tokenstringgeneratedbygithub"

Install

  1. Navigate to the directory you want to install to, find the latest released version of DemocracyOS
  2. git clone https://github.com/DemocracyOS/app.git
  3. git checkout _thelatestreleasesname_
  4. cp config/sample.json config/development.json (You may need to edit this development.json file for your server, but it will often build by default)
  5. sudo service mongod start (make sure mongodb is ready)

Running

  1. make run (In the root directory of your application)
  2. Navigate to http://localhost:3000/ on your browser

Loading sample data

In order for you to see a fully working deployment, you will need some sample data. This can be achieved by either of these approaches: