From f2c79787a87ce812c5f90dae8fc7d9be38c2bbc3 Mon Sep 17 00:00:00 2001 From: Kishore kumar J Date: Tue, 16 Nov 2010 15:17:45 +0530 Subject: [PATCH] New INSTALL file written in HTML --- INSTALL | 85 ----------------------------------- INSTALL.html | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 85 deletions(-) delete mode 100644 INSTALL create mode 100644 INSTALL.html diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 1b25196..0000000 --- a/INSTALL +++ /dev/null @@ -1,85 +0,0 @@ -Pre-requisites -============== - In order to run a local version of 'wtfimb', you need: - 1. Django (v1.2.1 recommended) - 2. Postgresql 8.4 - 3. python-psycopg2 - 4. postgresql-8.4-postgis - 5. libgdal1-1.6.0 (GDAL 1.6) - 6. libproj0 (Cartographic projection library) - 7. south (Django-south) - 8. Django-registration - 9. Django_AuthOpenid - 10. Django-reversion - 11. libgeos-c1 (Version 3.1) - 12. Django_extensions - -Download -======== - The project folder(wtfimb) can be downloaded from http://github.com/yuvipanda/wtfimb. Alternatively, you can clone the git branch with, - $ git clone git://github.com/yuvipanda/wtfimb.git - $ cd wtfimb - -Setting Up -========== - The following procedure assumes that you are using Ubuntu Operating System. If not, you may have to edit the commands/procedure to match your operating system. - - 1. Setting up the Database: - --------------------------- - 1.1. If you are using postgresql for the first time, you should consider creating an user. - $ sudo su postgres - % createuser jack --pwprompt - 1.2. Creating a postgis template - % psql template1 - # \c template1 - # CREATE DATABASE template_postgis WITH template = template1; - # UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'; - # \c template_postgis - # CREATE LANGUAGE plpgsql; - # \i /usr/share/postgresql/8.4/contrib/postgis.sql; - # \i /usr/share/postgresql/8.4/contrib/spatial_ref_sys.sql; - # GRANT ALL ON geometry_columns TO PUBLIC; - # GRANT ALL ON spatial_ref_sys TO PUBLIC; - # VACUUM FREEZE; - # \q - % - 1.3. Creating wtfimb database as a spatial database - % createdb -T template_postgis -O jack wtfimb - 1.4. Testing newly created database - % psql -U -d wtfimb -h localhost - > select * from spatial_ref_sys where srid=4326; - > \q - % logout - $ - 2. Configuring Local settings - ----------------------------- - 2.1. Copy localsettings.py.sample and rename it as localsettings.py - $ cp localsettings.py.sample localsettings.py - 2.2. Open localsettings.py for editing - $ gedit localsettings.py - 2.3. Fill in the database name as 'wtfimb' - 2.4. Enter the database user as 'jack' - 2.5. Enter the database user's password - 3. Setting up Environment - ------------------------- - 3.1. Hack fix to a gdal bug [http://bugs.debian.org/579989] - If using GDAL version 1.6.3, you need to perform this step. Otherwise, ignore. - Symlink libproj.so.0 to libproj.so in the /usr/lib folder - $ sudo ln -s /usr/lib/libproj.so.0 /usr/lib/libproj.so - 3.2. Sync database with all model tables - $ python manage.py syncdb - 3.3. Do migrations to tables - $ python manage.py migrate - 3.4. Populate database with database dump - $ python manage.py loaddata dump20100509_fmt_clean.json - 3.5. Run maintenance commands - $ python calculateimportance.py - $ python updatedistancegraph.py - $ python updateadjacencygraph.py - 4. Running and Testing the Application - -------------------------------------- - 4.1. Using Runserver - $ python manage.py runserver - - - diff --git a/INSTALL.html b/INSTALL.html new file mode 100644 index 0000000..75c30d7 --- /dev/null +++ b/INSTALL.html @@ -0,0 +1,125 @@ + + + + + Install | Busroutes.in + + + +
+
Install
+
+
Pre-requisites
+
    +
  • Django 1.2.x +
    sudo easy_install django
  • +
  • Django Extensions +
    sudo easy_install django-extensions
  • +
  • Django South 0.7.1 +
    sudo easy_install south
  • +
  • Django Reversion +
    sudo easy_install django-reversion
  • +
  • Postgresql 8.4 +
    sudo apt-get install postgresql-8.4
  • +
  • Postgis ( GIS support for Postgresql ) +
    sudo apt-get install postgresql-8.4-postgis
  • +
  • Python Psycopg2 ( Database driver for Postgresql ) +
    sudo easy_install psycopg2
  • +
  • GDAL 1.6 ( Geospatial Data Abstraction Library ) +
    sudo apt-get install libgdal1-1.6.0
  • +
  • Cartographic projection library +
    sudo apt-get install libproj0
  • +
  • GEOS 3.1( Geometry Engine - Open Source ) +
    sudo apt-get install libgeos-c1
  • +
+
+
+
Setting Up (for Ubuntu 10.04 )
+
    +
  1. Setting up the Database +
      +
    • If you are using postgresql for the first time, you should consider creating an user. +
      sudo su postgres
      +
      createuser foo --pwprompt
    • +
    • Creating a postgis template +
      psql template1
      +
      \c template1
      CREATE DATABASE template_postgis WITH template = template1;
      UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
      \c template_postgis
      CREATE LANGUAGE plpgsql;
      \i /usr/share/postgresql/8.4/contrib/postgis.sql;
      \i /usr/share/postgresql/8.4/contrib/spatial_ref_sys.sql;
      GRANT ALL ON geometry_columns TO PUBLIC;
      GRANT ALL ON spatial_ref_sys TO PUBLIC;
      VACUUM FREEZE;
      \q
    • +
    • Creating wtfimb database as a spatial database +
      createdb -T template_postgis -O foo wtfimb
    • +
    • Testing newly created database
    • +
      psql -U foo -d wtfimb -h localhost
      +
      select * from spatial_ref_sys where srid=4326;
      \q
      +
      logout
      +
    +
  2. +
  3. Configuring Local settings +
      +
    • Copy localsettings.py.sample and rename it as localsettings.py +
      cp localsettings.py.sample localsettings.py
    • +
    • Open localsettings.py for editing +
      gedit localsettings.py
    • +
    • Fill in the database name as 'wtfimb'
    • +
    • Enter the database user as 'foo'
    • +
    • Enter the database user's password
    • +
    +
  4. +
  5. Setting up Environment +
      +
    • Hack fix to a gdal bug [#579989] +

      If using GDAL version 1.6.3, you need to perform this step. Otherwise, ignore. Symlink libproj.so.0 to libproj.so in the /usr/lib folder

      +
      sudo ln -s /usr/lib/libproj.so.0 /usr/lib/libproj.so
    • +
    • Sync database with all model tables with migration +
      python manage.py syncdb --migrate
    • +
    • Populate database with database dump +
      python manage.py loaddata stages.dump.json
      python manage.py loaddata routes.dump.json
    • +
    • Run maintenance commands +
      python scripts/calculateimportance.py
      python scripts/updatedistancegraph.py
      python scripts/updateadjacencygraph.py
    • +
    +
  6. +
  7. Running and Testing the Application +
      +
    • Using Runserver +
      python manage.py runserver
    • +
    +
+
+
+ + + + +