Changes between Version 13 and Version 14 of GeoDjangoUbuntuInstall


Ignore:
Timestamp:
08/17/2008 10:25:34 AM (7 years ago)
Author:
fsgpr
Comment:

Started major updates and revamping for Ubuntu 8.04 LTS

Legend:

Unmodified
Added
Removed
Modified
  • GeoDjangoUbuntuInstall

    v13 v14  
    55The GeoDjangoInstall wiki describes in detail how to install GeoDjango dependencies from '''source''', which for many reasons is a great approach.
    66
    7 However, with the recent Ubuntu releases you can also use the '''Synaptic Package Manager''' (`apt-get install` on the command line) to handle the installation work for you.
     7However, with Ubuntu releases you can also use the '''Synaptic Package Manager''' (`apt-get install` on the command line) to handle some of the installation work for you.  In the next version of Ubuntu (8.10), it will likely be possible to install almost everything needed using Synaptic as libraries are updated.
    88
    99 * Note: if you take this route, be advised that the location of install directories will differ significantly from the source install approach. ie. PostGIS will be installed inside the PostgreSQL contrib and share directories specific to the PostgreSQL version number.
    1010
    11 This writeup is based on Ubuntu 7.10. Any readers should update this document based on their experience from other versions.
     11This writeup is based on Ubuntu 8.04 LTS. Any readers should update this document based on their experience from this version and note differences with newer versions.
    1212
    1313== Short Version ==
    14  * Install Django from trunk
    15  * Add the Ubuntu universe and multiverse debs
    16  * Update and upgrade Ubuntu with Apt-get
    17  * Easy_install Pycopg2
    18  * If you need Postgres and Apache apt-get them
    19   * make sure to grab the dev versions
    20   * edit pg_hba.conf to allow django connections
    21  * Apt-get postgis, libgdal, libgeos, and proj
     14 * Install Django 1.0 or later
     15 * Using apt-get or Synaptic, install apache2, python-psycopg2, postgresql, build-essential, libapache2-mod-python, postgresql-8.3-postgis
     16 * Edit /etc/postgresql/8.3/main/pg_hba.conf to allow django connections
     17 * Edit /etc/apache2/sites-available/default when creating your first GeoDjango app
     18 * Download, compiles and install GDAL and GEOS libraries   
     19    * gdal-1.5.2.tar.gz from http://download.osgeo.org/gdal/
     20    * geos-3.0.0 from http://geos.refractions.net/downloads
    2221 * Create your PostGIS enabled PostgreSQL db
    2322 * Proceed with writing your first GeoDjango app
     
    2726
    2827=== Step 1 ===
    29 Add the universe and multiverse debian repositories
    30 
     28Install Needed Programs using apt-get or Synaptic
    3129{{{
    32 #if you have the desktop edition
    33 sudo gedit /etc/apt/sources.list
    34 #if you have the server edition
    35 sudo nano /etc/apt/sources.list
    36 # if you know how to use vim, you probably don't need to be reading this page!
    37 sudo vim /etc/apt/sources.list
    38 ## Add these Universe / Multiverse sites to the bottom of the page
    39 ## Make sure to specify the correct Ubuntu version
    40 deb http://archive.ubuntu.com/ubuntu gutsy universe multiverse
    41 deb-src http://archive.ubuntu.com/ubuntu gutsy universe multiverse
    42 deb http://archive.ubuntu.com/ubuntu gutsy-security universe multiverse
    43 deb-src http://archive.ubuntu.com/ubuntu gutsy-security universe multiverse
    44 deb http://archive.ubuntu.com/ubuntu gutsy-updates universe multiverse
    45 deb-src http://archive.ubuntu.com/ubuntu gutsy-updates universe multiverse
     30apt-get install apache2 python-psycopg2 postgresql build-essential libapache2-mod-python postgresql-8.3-postgis   #Or install using Synaptic
    4631}}}
    4732
    4833=== Step 2 ===
    49 Then upgrade and update ubuntu based on these new sources
    50 {{{
    51 apt-get update
    52 apt-get upgrade
    53 }}}
    5434
    55 === Step 3 ===
    56 Use easy_install to install psycopg2
    57 {{{
    58 wget http://peak.telecommunity.com/dist/ez_setup.py
    59 sudo python ez_setup.py
    60 sudo easy_install psycopg2
    61 }}}
    62 
    63 === Step 4 ===
    64 Install Apache and PostgreSQL (if you need them)
    65 {{{
    66 apt-get install apache2 apache2-threaded-dev apache2-doc apache2-mpm-prefork apache2-utils ssl-cert 
    67 }}}
    68 {{{
    69 sudo apt-get install postgresql postgresql-contrib postgresql-server-dev-8.3 # or -8.2
    70 }}}
    71  * Then make sure that the postgresql programs are on your path or in .bash_profile
    72 {{{
    73 Export PATH=/usr/lib/postgresql/8.3/bin/
    74 }}}
    7535 * Open up access in the pg_hba.conf file
    7636{{{
    77 sudo vim /etc/postgresql/8.3/main/pg_hba.conf
     37sudo pico /etc/postgresql/8.3/main/pg_hba.conf #Alternatively use gedit or a text editor of your choice 
    7838# change ident sameuser to trust - WARNING SECURITY RISK
    7939# comment out this line to allow, for instance, to django/psycopg2 to connect without password
     
    8747
    8848
    89 === Step 5 ===
    90 Apt-get install postgis, libgdal, libgeos, and proj
    91  * Note: search for the exact package names with
     49=== Step 3 ===
     50Download needed libraries that do not have new enough versions in Synaptic
    9251{{{
    93 apt-cache search GIS_LIB_NAME
     52    wget gdal-1.5.2.tar.gz http://download.osgeo.org/gdal/
     53    wget geos-3.0.0 http://geos.refractions.net/downloads
    9454}}}
    9555
     56=== Step 5 ===
     57Compile and install these libraries so GeoDjango can find them
     58Extract gdal-1.5.2.tar.gz and geos-3.0.0 to folders on your Desktop and install::
    9659{{{
    97 apt-get install postgresql-8.3-postgis libgeos-dev libgeos-c1 libgdal1-dev proj
     60    #in the gdal-1.5.2 directory
     61    ./configure --datadir=/usr/local/share/gdal
     62    make
     63    sudo make install
     64
     65    #in the geos-3.0.0 directory
     66    ./configure
     67    make
     68    sudo make install       
     69
     70    sudo cp /home/[Your Username]/geos-3.0.0/capi/libs/* /usr/lib/
     71    sudo cp /usr/share/gdal/gcs.csv /usr/local/share/
    9872}}}
    9973
    100 === Step 6 ===
     74=== Step 4 ===
    10175Create your PostGIS `template_postgis` database
    10276{{{
     
    149123}}}
    150124
    151 === Step 7 ===
     125=== Step 5 ===
    152126Return to  GeoDjangoInstall for troubleshooting and tests for GDAL and GEOS (see bottom of page)
    153127
    154 === Step 8 ===
     128=== Step 6 ===
    155129Check out [http://mapserver.gis.umn.edu/ MapServer], [http://mapnik.org/ Mapnik], and [http://openlayers.org/ OpenLayers], open source mapping applications recommended for use with !GeoDjango.
    156130
    157131Install these and a few other helpful utilities with:
    158132{{{
    159 sudo apt-get install cgi-mapserver mapserver-bin python-gdal python-mapscript gdal-bin
     133sudo apt-get install cgi-mapserver python-gdal python-mapscript
    160134}}}
Back to Top