| 1 | [[TOC()]] |
| 2 | = !GeoDjango Ubuntu Installation = |
| 3 | |
| 4 | The GeoDjangoInstall wiki describes in detail how to install GeoDjango dependencies from source, which for many reasons is the ideal approach. However, with the recent Ubuntu releases you can also use the Synaptic Package Manager (apt-get install on the command line) to handle much of the installation work for you. |
| 5 | |
| 6 | == Short Version == |
| 7 | * Django from trunk |
| 8 | * Add the Ubuntu universe and multiverse debs |
| 9 | * Update and upgrade Ubuntu with Apt-get |
| 10 | * easy_install Pycopg2 |
| 11 | * If you need Postgres and Apache apt-get 'em |
| 12 | * make sure to grab the dev versions |
| 13 | * make sure you edit pg_hba.conf to allow django |
| 14 | * Apt-get postgis, libgdal, libgeos, and proj |
| 15 | * Create your PostGIS enabled PostgreSQL db |
| 16 | |
| 17 | == Full Instructions == |
| 18 | |
| 19 | === Step 1 === |
| 20 | Add the universe and multiverse debian repositories |
| 21 | |
| 22 | {{{ |
| 23 | #if you have the desktop edition |
| 24 | sudo gedit /etc/apt/sources.list |
| 25 | #if you have the server edition |
| 26 | sudo nano /etc/apt/sources.list |
| 27 | # if you know how to use vim, you probably don't need to be reading this page! |
| 28 | sudo vim /etc/apt/sources.list |
| 29 | ## Add these Universe / Multiverse sites to the bottom of the page |
| 30 | ## Make sure to specify the correct Ubuntu version |
| 31 | deb http://archive.ubuntu.com/ubuntu gutsy universe multiverse |
| 32 | deb-src http://archive.ubuntu.com/ubuntu gutsy universe multiverse |
| 33 | deb http://archive.ubuntu.com/ubuntu gutsy-security universe multiverse |
| 34 | deb-src http://archive.ubuntu.com/ubuntu gutsy-security universe multiverse |
| 35 | deb http://archive.ubuntu.com/ubuntu gutsy-updates universe multiverse |
| 36 | deb-src http://archive.ubuntu.com/ubuntu gutsy-updates universe multiverse |
| 37 | }}} |
| 38 | |
| 39 | === Step 2 === |
| 40 | Then upgrade and update ubuntu based on these new sources |
| 41 | {{{ |
| 42 | apt-get update |
| 43 | apt-get upgrade |
| 44 | }}} |
| 45 | |
| 46 | === Step 3 === |
| 47 | Use easy_install to install psycopg2 |
| 48 | {{{ |
| 49 | wget http://peak.telecommunity.com/dist/ez_setup.py |
| 50 | sudo python ez_setup.py |
| 51 | sudo easy_install psycopg2 |
| 52 | }}} |
| 53 | |
| 54 | === Step 4 === |
| 55 | Install Apache and PostgreSQL (if you need them) |
| 56 | {{{ |
| 57 | apt-get install apache2 apache2-threaded-dev apache2-doc apache2-mpm-prefork apache2-utils ssl-cert |
| 58 | }}} |
| 59 | {{{ |
| 60 | sudo apt-get install postgresql postgresql-contrib postgresql-server-dev-8.3 |
| 61 | }}} |