| 1 | = How to install PostGIS 1.5 on Debian Squeeze from packages = |
| 2 | |
| 3 | ||'''Component'''||'''Version'''|| |
| 4 | ||PostGIS||1.5|| |
| 5 | ||PostgreSQL||8.4|| |
| 6 | ||PROJ||4.7|| |
| 7 | ||GEOS||3.2|| |
| 8 | |
| 9 | Either log-in as `root`, or use "`su - root`" from a user account with admin privileges. Install everything using: |
| 10 | {{{ |
| 11 | apt-get install postgresql-8.4-postgis |
| 12 | }}} |
| 13 | Accept and install the approx 12 packages. |
| 14 | |
| 15 | Complete a post-install by creating a template, which can be re-used for creating multiple spatially-enabled databases. Or if you just want to make one spatially enabled database, you can modify the commands for your needs. |
| 16 | |
| 17 | Log-in as `postgres` from `root` using "`su - postgres`", and use the following commands: |
| 18 | {{{ |
| 19 | createdb template_postgis |
| 20 | createlang plpgsql template_postgis |
| 21 | psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql |
| 22 | psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql |
| 23 | psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis_comments.sql |
| 24 | }}} |