Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Installation

Andrew Sorensen edited this page Apr 6, 2015 · 35 revisions

Base System requirements

Hardware

  • 1GB of ram
  • 2-4 CPU cores

Software

  • Ubuntu 14.04
  • Python 3.4
  • Postgres with PostGIS

Ubuntu 14.04 Package List

  • python3-pip
  • postgresql-server-dev-all
  • psycopg2

Or as one command:


Third Party Modules

Make sure you are installing the python 3.x version of these modules (using your distribution's package manager, pip3 or pip-python3)

  • django-filter
  • django-dashing
  • django-guardian
  • django-bootstrap3
  • requests
  • djangorestframework
  • django-bootstrap-navtags
  • django-formtools

Getting Started

$ git clone https://github.com/wl-net/dataview.git

Follow the Configuration section to learn how to configure Dataview.

Once configured:

$ python3 manage.py runserver 0.0.0.0:8000

To deploy Dataview with Apache review the Configure Apache section. Navigate to the instance you configured, for example http://DATAVIEW:8000/ to get started.

Configuration

  1. Copy dataview/settings.dist.py to dataview/settings.py
  2. Set the SECRET_KEY directive.
  3. Set the STATIC_ROOT directive to
    /path/to/dataview/.static
  4. Configure the DATABASES section.
  5. Follow the section on "Postgres Configuration"
  6. run
    python3 manage.py syncdb
  7. run
    echo "yes" | python3 manage.py collectstatic

Detailed documentation of core django configuration options is provided on the djangoproject website: https://docs.djangoproject.com/en/1.7/ref/settings/

Configure Postgres

  1. Change user to the postgres user:
# su postgres -
  1. Create the user for dataview
$ createuser myuser
  1. Run the postgres shell:
$ psql template1
  1. Create the database
CREATE DATABASE dataview;
  1. Allow access to the database
GRANT ALL ON ALL TABLES IN SCHEMA public to "myuser";
GRANT ALL ON ALL SEQUENCES IN SCHEMA public to "myuser";
GRANT ALL ON ALL FUNCTIONS IN SCHEMA public to "myuser";

Note: Press ctrl+d to escape the postgres shell.

  1. Login to your new database:
$ psql dataview
  1. Enable PostGIS:
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION postgis_tiger_geocoder;

Run (in test mode):

$ python3 manage.py runserver 0.0.0.0:8000

Configure Apache

$ cp dataview/config/dataview.conf /etc/apache2/sites-available/
$ sudo a2ensite dataview
$ sudo service apache2 restart