{"id":169,"date":"2014-10-30T07:03:22","date_gmt":"2014-10-30T07:03:22","guid":{"rendered":"http:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=169"},"modified":"2015-01-06T21:35:43","modified_gmt":"2015-01-06T21:35:43","slug":"postgresqlpostgis-debian-wheezy","status":"publish","type":"post","link":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=169","title":{"rendered":"PostgreSQL\/PostGIS + Debian Wheezy"},"content":{"rendered":"<a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"http:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F169&#038;t=PostgreSQL%2FPostGIS%20%2B%20Debian%20Wheezy&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F169&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=PostgreSQL%2FPostGIS%20%2B%20Debian%20Wheezy\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F169&#038;text=Check%20this%20out%20%2F%20Mira%20esto\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-reddit nolightbox\" data-provider=\"reddit\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Reddit\" href=\"http:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F169&#038;title=PostgreSQL%2FPostGIS%20%2B%20Debian%20Wheezy\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"reddit\" title=\"Share on Reddit\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/reddit.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-pinterest nolightbox\" data-provider=\"pinterest\" target=\"_blank\" rel=\"nofollow\" title=\"Pin it with Pinterest\" href=\"http:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F169&#038;media=&#038;description=PostgreSQL%2FPostGIS%20%2B%20Debian%20Wheezy\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"pinterest\" title=\"Pin it with Pinterest\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/pinterest.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"http:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F169&#038;title=PostgreSQL%2FPostGIS%20%2B%20Debian%20Wheezy\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=PostgreSQL%2FPostGIS%20%2B%20Debian%20Wheezy&#038;body=Check%20this%20out%20%2F%20Mira%20esto:%20https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F169\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/mail.png\" \/><\/a><p><a id=\"spanish\"><\/a><br \/>\n<a href=\"#english\">[In English]<\/a><br \/>\nHe tenido que instalar PostgreSQL\/PostGIS, esta vez en una m\u00e1quina con Debian Wheezy. Estas son las diferencias respecto a la instalaci\u00f3n en Xubuntu 14.04:<\/p>\n<ul>\n<li>La versi\u00f3n de\u00a0 PostgreSQL que hay disponible en el Synaptic para este Debian es la 9.1. Estos son los paquetes instalados, comparados con <a href=\"http:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=54\" target=\"_blank\">los que instal\u00e9 en la versi\u00f3n 9.3<\/a>:\n<ol>\n<li><em>postgresql-server-dev-9.1<\/em><\/li>\n<li><em>postgresql-doc-9.1<\/em><\/li>\n<li><em>postgresql-client-9.1<\/em><\/li>\n<li><em>postgresql-client-common<\/em><\/li>\n<li><em>postgresql-9.1-postgis<\/em><\/li>\n<li><em>postgresql-9.1-postgis-2.1-scripts<\/em>: no est\u00e1 en el repositorio.<\/li>\n<li><em>libpq-dv<\/em>: no est\u00e1 en el repositorio.<\/li>\n<li><em>postgresql-common<\/em>: ya estaba instalada.<\/li>\n<li><em>libpq5<\/em>: ya estaba instalada.<\/li>\n<li><em>postgresql-doc<\/em>: no est\u00e1 en el repositorio, pero est\u00e1 instalada <em>postgresql-doc-9.1<\/em><\/li>\n<li><em>postgresql-client<\/em>: no est\u00e1 en el repositorio, pero est\u00e1 instalada<em> postgresql-client-9.1<\/em><\/li>\n<li><em>libreoffice-base-drivers<\/em>: no est\u00e1 en el repositorio, pero est\u00e1n instaladas <em>libreoffice-base-core<\/em> y <em>libreoffice-base<\/em><\/li>\n<li><em>postgresql-contrib-9.1<\/em><\/li>\n<li><em>postgis<\/em>: ya estaba instalada.<\/li>\n<li><em>postgresql-9.1<\/em>: no est\u00e1 en el repositorio.<\/li>\n<li><em>postgresql<\/em><\/li>\n<li><em>liblwgeom<\/em>: no est\u00e1 en el repositorio.<\/li>\n<\/ol>\n<\/li>\n<li>La versi\u00f3n de PostGIS en el repositorio es la 1.5.3-2. Esto implica que no se puede a\u00f1adir directamente como extensi\u00f3n, sino que hay que crear una plantilla o template (que es una base de datos que alberga las funciones PostGIS). En <a href=\"http:\/\/trac.osgeo.org\/postgis\/wiki\/UsersWikiPostGIS15Ubuntu1110src\" target=\"_blank\">este enlace<\/a> y en <a href=\"http:\/\/postgis.net\/docs\/manual-1.3\/ch02.html\" target=\"_blank\">este otro<\/a> se puede encontrar ayuda muy \u00fatil; los pasos que yo he seguido para crear la template a partir de ellos son los siguientes:\n<ol>\n<li>\u00a0Crear la plantilla\n<ol>\n<li><em>sudo -u postgres createdb template_postgis<\/em><\/li>\n<li><em>sudo -u postgres psql -d template_postgis -c &#8220;UPDATE pg_database SET datistemplate=true WHERE datname=&#8217;template_postgis'&#8221;<\/em><\/li>\n<li><em>sudo -u postgres psql -d template_postgis -f \/usr\/share\/postgresql\/9.1\/contrib\/postgis-1.5\/postgis.sql<\/em><\/li>\n<li><em>sudo -u postgres psql -d template_postgis -f \/usr\/share\/postgresql\/9.1\/contrib\/postgis-1.5\/spatial_ref_sys.sql<\/em><\/li>\n<\/ol>\n<\/li>\n<li>Crear la base de datos con dicha plantilla\n<ol>\n<li><em>sudo -u postgres createdb -T template_postgis mibasedatos<br \/>\n<\/em>(pgAdmin debe estar cerrado, si no, da error indicando que otro usuario est\u00e1 utilizando <em>template_postgis<\/em>)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p><a id=\"english\"><\/a><br \/>\n<a href=\"#spanish\">[En espa\u00f1ol]<\/a><\/p>\n<p>I had to install PostgreSQL\/PostGIS, though this time in a Debian Wheezy computer. These are the differences regarding to the installation in Xubuntu 14.04:<\/p>\n<ul>\n<li>In\u00a0 Debian Wheezy, Synaptic offers PostgreSQL 9.1. These are the packages I have installed, <a href=\"http:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=54\" target=\"_blank\">compared to those I installed in version 9.3<\/a>:\n<ol>\n<li><em>postgresql-server-dev-9.1<\/em><\/li>\n<li><em>postgresql-doc-9.1<\/em><\/li>\n<li><em>postgresql-client-9.1<\/em><\/li>\n<li><em>postgresql-client-common<\/em><\/li>\n<li><em>postgresql-9.1-postgis<\/em><\/li>\n<li><em>postgresql-9.1-postgis-2.1-scripts<\/em>: not in Synaptic.<\/li>\n<li><em>libpq-dv<\/em>:\u00a0 not in Synaptic.<\/li>\n<li><em>postgresql-common<\/em>: it is installed.<\/li>\n<li><em>libpq5<\/em>: it is installed.<\/li>\n<li><em>postgresql-doc<\/em>: not in Synaptic, but <em>postgresql-doc-9.1<br \/>\n<\/em>is installed.<\/li>\n<li><em>postgresql-client<\/em>: not in Synaptic, but <em>postgresql-client-9.1<br \/>\n<\/em>is installed.<\/li>\n<li><em>libreoffice-base-drivers<\/em>: not in Synaptic, but <em>libreoffice-base-core<\/em> and <em>libreoffice-base <\/em>are installed.<\/li>\n<li><em>postgresql-contrib-9.1<\/em><\/li>\n<li><em>postgis<\/em>: it is installed.<\/li>\n<li><em>postgresql-9.1<\/em>: not in Synaptic.<\/li>\n<li><em>postgresql<\/em><\/li>\n<li><em>liblwgeom<\/em>: not in Synaptic.<\/li>\n<\/ol>\n<\/li>\n<li>The PostGIS version in Synaptic is 1.5.3-2. This means that it cannot be added directly as an extension, but as a template (i.e., a database that stores PostGIS functions).\u00a0 In this <a href=\"http:\/\/trac.osgeo.org\/postgis\/wiki\/UsersWikiPostGIS15Ubuntu1110src\" target=\"_blank\">this link<\/a> and in <a href=\"http:\/\/postgis.net\/docs\/manual-1.3\/ch02.html\" target=\"_blank\">this other<\/a> you can find very useful information about how to create a template; using that information, these are the steps I have followed for creating my template:\n<ol>\n<li>\u00a0Template creation\n<ol>\n<li><em>sudo -u postgres createdb template_postgis<\/em><\/li>\n<li><em>sudo -u postgres psql -d template_postgis -c &#8220;UPDATE pg_database SET datistemplate=true WHERE datname=&#8217;template_postgis'&#8221;<\/em><\/li>\n<li><em>sudo -u postgres psql -d template_postgis -f \/usr\/share\/postgresql\/9.1\/contrib\/postgis-1.5\/postgis.sql<\/em><\/li>\n<li><em>sudo -u postgres psql -d template_postgis -f \/usr\/share\/postgresql\/9.1\/contrib\/postgis-1.5\/spatial_ref_sys.sql<\/em><\/li>\n<\/ol>\n<\/li>\n<li>Database creation using that template\n<ol>\n<li><em>sudo -u postgres createdb -T template_postgis mydatabase<br \/>\n<\/em>(pgAdmin must be closed; if not, an error arises noting that other user is using\u00a0 <em>template_postgis<\/em>)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>[In English] He tenido que instalar PostgreSQL\/PostGIS, esta vez en una m\u00e1quina con Debian Wheezy. Estas son las diferencias respecto a la instalaci\u00f3n en Xubuntu 14.04: La versi\u00f3n de\u00a0 PostgreSQL que hay disponible en el Synaptic para este Debian es la 9.1. Estos son los paquetes instalados, comparados con los que instal\u00e9 en la versi\u00f3n &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=169\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;PostgreSQL\/PostGIS + Debian Wheezy&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[12],"tags":[43,16,14,13,15],"_links":{"self":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts\/169"}],"collection":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=169"}],"version-history":[{"count":23,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":224,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions\/224"}],"wp:attachment":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}