Last active
December 15, 2015 07:29
-
-
Save jwalgran/5223402 to your computer and use it in GitHub Desktop.
A shell script to provision the PostGIS 2.0 dependencies on Ubuntu 12.04.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install -y build-essential autoconf libtool subversion git curl wget | |
apt-get install -y openssh-server | |
apt-get install -y python-software-properties | |
add-apt-repository -y ppa:keithw/mosh | |
apt-get update | |
apt-get install -y mosh | |
# Postgres | |
apt-get install -y postgresql-9.1 libpq-dev postgresql-server-dev-9.1 | |
# LIBXML2 | |
apt-get install -y libxml2 libxml2-dev | |
# JSON-C | |
apt-get install libjson0 libjson0-dev | |
# PROJ | |
mkdir -p ~/src | |
cd ~/src | |
wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz | |
tar xvf proj-4.8.0.tar.gz | |
rm proj-4.8.0.tar.gz | |
cd ~/src/proj-4.8.0 | |
./configure | |
make && make install | |
# GEOS | |
cd ~/src | |
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2 | |
tar xvf geos-3.3.8.tar.bz2 | |
rm geos-3.3.8.tar.bz2 | |
cd ~/src/geos-3.3.8 | |
./configure | |
make && make install | |
# GDAL | |
cd ~/src | |
wget http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz | |
tar xvf gdal-1.9.2.tar.gz | |
rm gdal-1.9.2.tar.gz | |
cd ~/src/gdal-1.9.2 | |
./configure | |
make && make install | |
###### | |
$ sudo -u postgres psql | |
postgres=# CREATE ROLE {your-user-name-here} WITH SUPERUSER; | |
postgres=# ALTER ROLE {your-user-name-here} LOGIN; | |
postgres=# \q | |
$ git clone git://github.com/postgis/postgis.git | |
$ cd postgis | |
$ ./autogen | |
$ ./configure | |
$ make | |
$ sudo make install | |
$ make test | |
$ make check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment