Created
November 9, 2013 20:40
-
-
Save ldlsegovia/7389724 to your computer and use it in GitHub Desktop.
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
Install postgress | |
1 - sudo apt-add-repository ppa:sharpie/for-science # To get GEOS | |
2 - sudo apt-get -y --force-yes install postgresql-9.1 postgresql-server-dev-9.1 postgresql-contrib-9.1 gdal-bin binutils libgeos-c1 libgeos-dev libspatialite libspatialite-dev libgdal1-dev libxml2 libxml2-dev libxml2-dev checkinstall libproj0 libproj-dev libpq-dev build-essential | |
3 - sudo mkdir -p '/usr/share/postgresql/9.1/contrib/' | |
4 - cd usr/share/postgresql/9.1/contrib/ | |
5 - wget http://postgis.refractions.net/download/postgis-2.0.2.tar.gz | |
6 - tar zxvf postgis-2.0.2.tar.gz && cd postgis-2.0.2 | |
7 - ./configure --with-raster --with-topology | |
8 - make | |
9 - sudo make install | |
and then.. | |
sudo su postgres -c'createdb -E UTF8 -U postgres template_postgis' | |
sudo su postgres -c'createlang -d template_postgis plpgsql;' | |
sudo su postgres -c'psql -U postgres -d template_postgis -c"CREATE EXTENSION hstore;"' | |
sudo su postgres -c'psql -U postgres -d template_postgis -f postgis.sql' (en un directorio atras estan estos sql) | |
sudo su postgres -c'psql -U postgres -d template_postgis -f spatial_ref_sys.sql' | |
sudo su postgres -c'psql -U postgres -d template_postgis -c"select postgis_lib_version();"' | |
sudo su postgres -c'psql -U postgres -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;"' | |
sudo su postgres -c'psql -U postgres -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"' | |
sudo su postgres -c'psql -U postgres -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"' |
Change 'libspatialite' to 'libspatialite3', so the entire line reads:
sudo apt-get -y --force-yes install postgresql-9.1 postgresql-server-dev-9.1 postgresql-contrib-9.1 gdal-bin binutils libgeos-c1 libgeos-dev libspatialite3 libspatialite-dev libgdal1-dev libxml2 libxml2-dev libxml2-dev checkinstall libproj0 libproj-dev libpq-dev build-essential
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi I tried thissudo apt-get -y --force-yes install postgresql-9.1 postgresql-server-dev-9.1 postgresql-contrib-9.1..... and got this error
and I am using ubuntu saucy 13.10
E: Unable to locate package libspatialite