Skip to content

Instantly share code, notes, and snippets.

@omgbbqhaxx
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omgbbqhaxx/2e4493154df80710802e to your computer and use it in GitHub Desktop.
Save omgbbqhaxx/2e4493154df80710802e to your computer and use it in GitHub Desktop.
Geodjango installation steps.
#!/bin/bash
#http://postgis.net/source
# Install Postgres 9.4, PostGIS and create PostGIS template on a clean Ubuntu
# Yasin Aktimur
#First steps
-*-*-*-*-*-*-
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vim
sudo apt-get install python-dev
sudo apt-get install libevent-dev
sudo apt-get install python-virtualenv
sudo apt-get install libpq-dev python-dev
sudo apt-get install build-essential
sudo apt-get -y install python-software-properties
apt-get install git
apt-get install make
apt-get install libxml2-dev libxslt-dev
apt-get install python-lxml
-**-Donwload GEOS*-*-
wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
tar xjf geos-3.4.2.tar.bz2
cd geos-3.4.2
./configure
make
sudo make install
*-*- Download PROJ.4 -*-*
wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.tar.gz
tar xzf proj-4.8.0.tar.gz
cd proj-4.8.0/nad
tar xzf ../../proj-datumgrid-1.5.tar.gz
cd ..
./configure
make
sudo make install
cd ..
-*-*-*-*-*-*-
pip install psycopg2
# the big list of apt dependencies to check we have installed
/etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
apt-get -y install postgresql-9.4
apt-get -y install postgresql-client-9.4
apt-get -y install postgresql-contrib-9.4
apt-get -y install libpq-dev
apt-get -y install postgresql-server-dev-9.4
# fetch, compile and install PostGIS
GO : http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21UbuntuPGSQL93Apt
#check your psql version
yasinaktimur@geodjango:~/home$ psql --version
select PostGIS_full_version();
if you withuot gdal use :
./configure --without-raster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment