Changes between Version 8 and Version 9 of UsersWikiPostGIS20Ubuntu1204
- Timestamp:
- 05/05/12 21:45:46 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiPostGIS20Ubuntu1204
v8 v9 1 = How to installPostGIS 2.0 on Ubuntu 12.04 (''precise'') =1 = How to Get Started with PostGIS 2.0 on Ubuntu 12.04 (''precise'') = 2 2 UNDER CONSTRUCTION AS OF 5/5/12 2000 PT. 3 3 4 4 This page is targeted at new users and will be written as simply as possible. 5 5 6 == Source or Packaged? == 7 The page is in development. Methods posted below are accurate as of last page update. 6 == Install PostGIS 2.0 == 8 7 9 == Prerequisites == 10 Prerequisites can be found at [wiki:UsersWikiPostgreSQLPostGIS PostGIS Support Matrix] 8 Installation requirements can be found at [wiki:UsersWikiPostgreSQLPostGIS PostGIS Support Matrix] 11 9 12 10 Key libraries to focus on: GEOS, GDAL. Issues related to these two libraries will dictate the method you choose to use to install PostGIS 2.0. … … 17 15 18 16 {{{ 19 $sudo apt-get install python-software-properties20 $sudo apt-add-repository ppa:sharpie/for-science21 $sudo apt-add-repository ppa:sharpie/postgis-nightly22 $sudo apt-get update23 $sudo apt-get install postgresql-9.1-postgis17 sudo apt-get install python-software-properties 18 sudo apt-add-repository ppa:sharpie/for-science 19 sudo apt-add-repository ppa:sharpie/postgis-nightly 20 sudo apt-get update 21 sudo apt-get install postgresql-9.1-postgis 24 22 }}} 25 23 … … 36 34 === Hack-ish Installation using a combination of packages and sources === 37 35 38 ==== Build libGDAL1.9 ==== 36 ==== 1/4 Install PostgreSQL and other foundations ==== 37 38 Several components are needed, which can either be built from source or installed from pre-built packages, as shown below. 39 40 Install prerequisite packages using: 41 {{{ 42 sudo apt-get install build-essential postgresql-9.1 postgresql-server-dev-9.1 libxml2-dev proj libjson0-dev xsltproc docbook-xsl docbook-mathml gettext 43 }}} 44 45 ==== 2/4 Build libGDAL1.9 ==== 39 46 40 47 {{{ 41 $sudo apt-add-repository ppa:olivier-berten/geo42 $sudo apt-get update43 $sudo apt-get install libgdal-dev48 sudo apt-add-repository ppa:olivier-berten/geo 49 sudo apt-get update 50 sudo apt-get install libgdal-dev 44 51 }}} 45 52 … … 58 65 Crud... not quite 3.3.3. On to the next step. 59 66 60 ==== Build GEOS 3.3.x ====67 ==== 3/4 Build GEOS 3.3.x ==== 61 68 62 69 These are the instructions for building geos 3.3.3, based on instructions found elsewhere on trac.osgeo.org with some additions determined through trial and error: … … 76 83 $ geos-config --version 77 84 3.3.3 78 $79 85 }}} 80 86 81 87 82 == older notes == 83 84 Several components are needed, which can either be built from source or installed from pre-built packages, as shown below. 85 86 Install prerequisite packages using: 87 {{{ 88 sudo apt-get install build-essential postgresql-9.1 postgresql-server-dev-9.1 libxml2-dev proj libjson0-dev xsltproc docbook-xsl docbook-mathml 89 }}} 90 91 Optional package for raster support (this is required if you want to build the PostgreSQL extensions): 92 {{{ 93 sudo apt-get install libgdal-dev 94 }}} 95 96 97 98 == Build PostGIS == 88 ==== 4/4 Build PostGIS ==== 99 89 {{{ 100 90 wget http://postgis.refractions.net/download/postgis-2.0.0.tar.gz … … 103 93 }}} 104 94 105 PostGIS 2.0 can be configured to disable topology or raster components, using the configure flags `--without-raster` and/or `--without-topology`. The default is to build both. Note that raster is required for the extension installation method for PostgreSQL.106 95 {{{ 107 ./configure 96 ./configure --with-gui <--- not sure if the with-gui is required 108 97 make 109 98 sudo make install … … 119 108 }}} 120 109 121 == Spatially enabling a database == 110 111 112 == Spatially-enable a database == 122 113 With PostgreSQL 9.1, there are two methods to add PostGIS functionality to a database: using extensions, or using enabler scripts. 123 114