Forked from un33k/geodjango ubuntu postgresql 9 - postgis 1.5
Created
March 23, 2012 16:42
-
-
Save jamespacileo/2172622 to your computer and use it in GitHub Desktop.
to run geodjango in ubuntu (10.04 tested)
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
sudo apt-get update | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:pitti/postgresql | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update | |
sudo apt-get install -y postgresql-9.1 postgresql-server-dev-9.1 postgresql-contrib-9.1 proj libgeos-3.2.2 libgeos-c1 libgeos-dev libgdal1-1.7.0 libgdal1-dev build-essential libxml2 libxml2-dev checkinstall | |
psql --version | |
wget http://postgis.refractions.net/download/postgis-1.5.3.tar.gz | |
tar zxvf postgis-1.5.2.tar.gz && cd postgis-1.5.3/ | |
sudo ./configure && sudo make && sudo checkinstall --pkgname postgis-1.5.3 --pkgversion 1.5.3-src --default | |
sudo su - postgres | |
POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-1.5 | |
createdb -E UTF8 template_postgis | |
createlang -d template_postgis plpgsql | |
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" | |
psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql | |
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql | |
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" | |
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;" | |
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" | |
createdb -T template_postgis demo_geo_database | |
createuser --createdb -P <user de ubuntu> |
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
sudo apt-get update | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:pitti/postgresql | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update | |
sudo apt-get install -y postgresql-9.0 postgresql-server-dev-9.0 postgresql-contrib-9.0 proj libgeos-3.2.2 libgeos-c1 libgeos-dev libgdal1-1.7.0 libgdal1-dev build-essential libxml2 libxml2-dev checkinstall | |
psql --version | |
wget http://postgis.refractions.net/download/postgis-1.5.2.tar.gz | |
tar zxvf postgis-1.5.2.tar.gz && cd postgis-1.5.2/ | |
sudo ./configure && sudo make && sudo checkinstall --pkgname postgis-1.5.2 --pkgversion 1.5.2-src --default | |
sudo su - postgres | |
POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-1.5 | |
createdb -E UTF8 template_postgis | |
createlang -d template_postgis plpgsql | |
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" | |
psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql | |
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql | |
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" | |
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;" | |
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" | |
createdb -T template_postgis demo_geo_database | |
createuser --createdb -P <user de ubuntu> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment