





[In English]
Estoy trabajando con PostgreSQL/PostGIS como base de datos, WWW SQL Designer para el diseño de la misma, y gvSIG 1.12.0 como GIS, todo ello bajo Xubuntu 14.04 (64 bits). La instalación y el uso de las tres herramientas tiene algunos trucos, que comentaré en varios posts. Hoy empezamos con PostgreSQL/PostGIS:
- La instalación de las dos herramientas se hace desde Synaptic
- No instalo phppagadmin (necesita apache2, y yo voy a usar lamp)
- Cosas que instalo:
- postgresql-server-dev-9.3
- postgresql-doc-9.3
- postgresql-client-9.3
- postgresql-client-common
- postgresql-9.3-postgis-2.1
- postgresql-9.3-postgis-2.1-scripts
- libpq-dv
- postgresql-common
- libpq5
- postgresql-doc
- postgresql-client
- libreoffice-base-drivers
- postgresql-contrib-9.3
- postgis
- postgresql-9.3
- postgresql
- liblwgeom-2.1.2
- Para la configuración, resulta útil este link de ayuda.
- Configuración básica del servidor. El usuario postgres está creado por defecto, pero bloqueado por seguridad para que no pueda accederse; por eso lo primero es cambiar la clave:
sudo -u postgres psql postgres
\password postgres ( e introducir nueva password cuando se pida)
Ctrl+D - Crear la extensión adminpack (igual sólo es necesario para PostgreSQL 9.1, no estoy segura):
sudo -u postgres psql
CREATE EXTENSION adminpack; - Crear el servidor en pgAdmin (usuario postgres, clave la que se ha cambiado antes)
- Añadir extensiones, una vez creada la BD:
· Botón derecho del ratón -> New object -> New extension -> postgis primero, postgis_topology después.
· Esto añade la tabla spatial_ref_sys; la antigua tabla geometry_columns es ahora una vista.
[En español]
I work with PostgreSQL/PostGIS (DB), WWW SQL Designer for designing the DB, and my GIS is gvSIG 1.12.0; the OS is Xubuntu 14.04 (64 bits). Installing and using these tools can be tricky, so I plan to write several posts about it. Today I will focus on PostgreSQL/PostGIS:
- I have installed both tools from Synaptic.
- I do not install phppagadmin (it requires apache2, but I will use lamp)
- List of elements to install:
- postgresql-server-dev-9.3
- postgresql-doc-9.3
- postgresql-client-9.3
- postgresql-client-common
- postgresql-9.3-postgis-2.1
- postgresql-9.3-postgis-2.1-scripts
- libpq-dv
- postgresql-common
- libpq5
- postgresql-doc
- postgresql-client
- libreoffice-base-drivers
- postgresql-contrib-9.3
- postgis
- postgresql-9.3
- postgresql
- liblwgeom-2.1.2
- This link is quite useful for configuration issues.
- Basic server configuration: user postgres is created by default, but it is blocked for security reasons; therefore, the first thing to do is to change the password:
sudo -u postgres psql postgres
\password postgres (type new password when required)
Ctrl+D - Now we create adminpack extension (maybe it should be done only in PostgreSQL 9.1, not sure about that):
sudo -u postgres psql
CREATE EXTENSION adminpack; - Create the server in pgAdmin (user postgres, password the one we have changed previously)
- Once we have created the DB, we add extensions:
· Right-click -> New object -> New extension -> first postgis primero, then postgis_topology.
· This adds spatial_ref_sys table; the old geometry_columns table is now a view.