| 1 | = How to install PostGIS 2.1 on Ubuntu 14.04 LTS (''trusty'') from packages = |
| 2 | |
| 3 | == Install PostGIS and dependencies == |
| 4 | This command should install PostgreSQL 9.3 with PostGIS 2.1 and related dependencies: |
| 5 | {{{ |
| 6 | sudo apt-get install postgresql-9.3-postgis-2.1 |
| 7 | }}} |
| 8 | |
| 9 | == Spatially enabling a database == |
| 10 | |
| 11 | Connect to your database using pgAdminIII or psql, and use the commands to add the PostgreSQL extensions. To add PostGIS with raster support: |
| 12 | {{{ |
| 13 | CREATE EXTENSION postgis; |
| 14 | }}} |
| 15 | |
| 16 | To add topology support, a second extension can be created on the database: |
| 17 | {{{ |
| 18 | CREATE EXTENSION postgis_topology; |
| 19 | }}} |
| 20 | |
| 21 | == See also == |
| 22 | * https://help.ubuntu.com/community/PostgreSQL |