{"id":1514,"date":"2016-11-30T14:25:00","date_gmt":"2016-11-30T20:25:00","guid":{"rendered":"http:\/\/linuxitos.com\/main\/configurar-phppgadmin-para-conectar-con-postgresql-en-fedora-25\/"},"modified":"2016-11-30T14:25:00","modified_gmt":"2016-11-30T20:25:00","slug":"configurar-phppgadmin-para-conectar-con-postgresql-en-fedora-25","status":"publish","type":"post","link":"https:\/\/linuxitos.com\/main\/configurar-phppgadmin-para-conectar-con-postgresql-en-fedora-25\/","title":{"rendered":"Configurar phppgAdmin  para conectar con PostgreSQL en Fedora 25"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/4.bp.blogspot.com\/-DIY8uRoJpqk\/WD8cWBmH_tI\/AAAAAAAAEEA\/Lr5BTHd9mSsiUgYXIC0-PydPUKgUBYBaACLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B12-35-58.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/4.bp.blogspot.com\/-DIY8uRoJpqk\/WD8cWBmH_tI\/AAAAAAAAEEA\/Lr5BTHd9mSsiUgYXIC0-PydPUKgUBYBaACLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B12-35-58.png\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">phpPgAdmin es una aplicaci\u00f3n web que provee una manera conveniente a los usuarios para crear bases de datos, tablas, alterarlas y consultar sus datos usando el lenguaje est\u00e1ndar SQL.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">phpPgAdmin estuvo basado en phpMyAdmin, pero hoy d\u00eda ya no comparte c\u00f3digo con \u00e9l; incluso provee las mismas funcionalidades y m\u00e1s a los usuarios del servidor de base de datos PostgreSQL.<\/span><\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Es muy \u00fatil cuando pgAdmin III no sea compatible con la versi\u00f3n que se tenga de postgresql, por ejemplo pgadmin III hasta hoy 30 de noviembre 2016, a\u00fan no tiene soporte como tal para postgresql 9.6, por ende este tipo de opciones son una alternativa.<\/span><\/div>\n<p><\/p>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">La instalaci\u00f3n y configuraci\u00f3n para fedora 25 con postgresql 9.6 es la que veremos a continuaci\u00f3n. Sin embargo, estos mismos pasos se pueden aplicar para otras versiones.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Ahora, aqu\u00ed se da por entendido que postgresql ya est\u00e1 instalado y funcionando previamente.<\/span><\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Instalar phpPgAdmin y httpd.<\/span><\/p>\n<div style=\"background-color: white; border: 0px; color: #262626; font-family: &quot;Carrois Gothic&quot;, sans-serif; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-style: inherit; font-weight: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">sudo dnf -y install phpPgAdmin httpd<\/pre>\n<\/div>\n<p><span style=\"font-size: large;\">Configurar archivo:<\/span><\/p>\n<div style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-style: inherit; font-weight: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">su -c \"gedit \/etc\/httpd\/conf.d\/phpPgAdmin.conf\"<\/pre>\n<p><span style=\"font-size: large;\">El archivo debe quedar de la siguiente manera, en caso de que haya l\u00edneas de m\u00e1s, comentarlas con #.<\/span><\/div>\n<div style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">\n<pre style=\"background: url(&quot;assets\/shadow.png&quot;) 50% 100% repeat-x rgb(245, 245, 245); border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-shadow: rgb(204, 204, 204) 0px 0px 3px; box-sizing: border-box; font-stretch: normal; line-height: 1.6; margin-bottom: 10px; max-width: 100%; outline: 0px; overflow: auto; padding: 9.5px; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; word-break: break-all; word-wrap: break-word;\"><span style=\"color: #333333; font-family: menlo, monaco, consolas, courier new, monospace;\"><span style=\"font-size: 15px; white-space: pre-wrap;\">#<br \/># This configuration file maps the phpPgAdmin directory into the URL space.<br \/># By default this application is only accessible from the local host.<br \/>#<br \/><br \/>Alias \/phpPgAdmin \/usr\/share\/phpPgAdmin<br \/><br \/>&lt;Location \/phpPgAdmin&gt;<br \/>    &lt;IfModule mod_authz_core.c&gt;<br \/>        # Apache 2.4<br \/>        Require all granted<br \/>        #Require local<br \/>        #Require host example.com<br \/>    &lt;\/IfModule&gt;<br \/>    &lt;IfModule !mod_authz_core.c&gt;<br \/>        # Apache 2.2<br \/>        Order deny,allow<br \/>        Allow from all<br \/>        Allow from 127.0.0.1<br \/>        Allow from ::1<br \/>        # Allow from .example.com<br \/>    &lt;\/IfModule&gt;<br \/>&lt;\/Location&gt;<\/span><\/span><span style=\"color: #262626; font-family: &quot;Courier 10 Pitch&quot;, Courier, monospace; font-size: 1.5rem; font-style: inherit; font-weight: inherit;\"><br \/><\/span><\/pre>\n<div><\/div>\n<\/div>\n<div style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"font-size: large;\">Iniciar o Reiniciar el servicios de apache:<\/span><\/div>\n<div style=\"background-color: white; border: 0px; color: #262626; font-family: &quot;Carrois Gothic&quot;, sans-serif; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-style: inherit; font-weight: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">sudo service httpd start<\/pre>\n<\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Configurar el archivo&nbsp;\/etc\/phpPgAdmin\/config.inc.php para phpPgAdmin.<\/span><\/div>\n<div style=\"background-color: white; border: 0px; color: #262626; font-family: &quot;Carrois Gothic&quot;, sans-serif; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-style: inherit; font-weight: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">su -c \"gedit \/etc\/phpPgAdmin\/config.inc.php\"<\/pre>\n<\/div>\n<p><span style=\"font-size: large;\">Buscar las siguientes l\u00edneas y modificarlas de tal modo que queden de la siguiente manera:<\/span><\/p>\n<pre style=\"background: url(&quot;assets\/shadow.png&quot;) 50% 100% repeat-x rgb(245, 245, 245); border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-shadow: rgb(204, 204, 204) 0px 0px 3px; box-sizing: border-box; font-family: &quot;Courier 10 Pitch&quot;, Courier, monospace; font-size: 1.5rem; font-stretch: normal; font-style: inherit; font-weight: inherit; line-height: 1.6; margin-bottom: 10px; max-width: 100%; outline: 0px; overflow: auto; padding: 9.5px; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; word-break: break-all; word-wrap: break-word;\"><span style=\"border: 0px; font-family: menlo, monaco, consolas, &quot;courier new&quot;, monospace; font-size: 15px; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; line-height: 18.5714px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;\">[...]<br \/># esta l\u00ednea debe quedar as\u00ed:<br \/>$conf['servers'][0]['host'] = 'localhost';<br \/><br \/><br \/>[...]<br \/># esta l\u00ednea debe quedar as\u00ed<br \/>$conf['extra_login_security'] = false;<br \/><br \/><br \/>[...]<br \/>La siguiente l\u00ednea debe quedar as\u00ed<br \/>$conf['owned_only'] = true;<\/span><\/span><\/pre>\n<div><span style=\"border: 0px; color: #333333; font-family: menlo, monaco, consolas, &quot;courier new&quot;, monospace; font-size: 15px; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; line-height: 18.5714px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;\"><br \/><\/span><\/span><\/div>\n<p><span style=\"font-size: large;\">Una vez finalizada la configuraci\u00f3n del archivo, iniciar o reiniciar los servicios de postgresql, en este ejemplo se us\u00f3 postgresql 9.6, por ente el comando es el siguiente, adecuarlo de acuerdo a la versi\u00f3n de postgresql que est\u00e9n usando.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"background-color: white; border: 0px; color: #262626; font-family: &quot;Carrois Gothic&quot;, sans-serif; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-style: inherit; font-weight: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">sudo systemctl start postgresql-9.6.service<\/pre>\n<div style=\"font-size: 12.8px;\"><\/div>\n<\/div>\n<p><span style=\"font-size: large;\">Ahora, ir al&nbsp;http:\/\/localhost\/phpPgAdmin y mostrar\u00e1 la siguiente ventana:<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/2.bp.blogspot.com\/-uN5qgrPHVX4\/WD8ltf-J0PI\/AAAAAAAAEEM\/uQMt3h4RXJI0ycaMM2Xq6YKCSvUoItizQCLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B13-14-48.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/2.bp.blogspot.com\/-uN5qgrPHVX4\/WD8ltf-J0PI\/AAAAAAAAEEM\/uQMt3h4RXJI0ycaMM2Xq6YKCSvUoItizQCLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B13-14-48.png\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"text-align: center;\"><span style=\"font-size: large;\">Ir a la opci\u00f3n que dice &lt;P\u00e1gina web de phpPgAdmin&gt;<\/span><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/2.bp.blogspot.com\/-nEpuh35TYdc\/WD8lujxVL6I\/AAAAAAAAEEU\/jvJlbpplP4wNRzGaUXRj636h0JDZzoZTgCLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B13-14-52.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/2.bp.blogspot.com\/-nEpuh35TYdc\/WD8lujxVL6I\/AAAAAAAAEEU\/jvJlbpplP4wNRzGaUXRj636h0JDZzoZTgCLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B13-14-52.png\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Ingresar el usuario y la contrase\u00f1a que usan para postgresql, si les llegara a marcar error de inicio de sesi\u00f3n, a pesar de que est\u00e1 bien, es debido a que Selinux requiere una instrucci\u00f3n para permitir el acceso. Del tal modo que eso se soluciona con la siguiente instrucci\u00f3n.<\/span><\/div>\n<p><\/p>\n<h2 style=\"background-color: white; border: 0px; clear: both; color: #1e4a66; font-family: &quot;Carrois Gothic&quot;, sans-serif; font-size: 2em; font-weight: 400; margin: 0.15em 0px; outline: 0px; padding: 0.15em 0px; vertical-align: baseline;\">\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-size: medium; font-style: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">sudo setsebool -P httpd_can_network_connect_db 1<\/pre>\n<\/h2>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/3.bp.blogspot.com\/-WWIUpPCuTSE\/WD8lubQ_-BI\/AAAAAAAAEEQ\/HsNmOpBijysp68CNM60wWj-DuVo0MfHhgCLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B13-15-33.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/3.bp.blogspot.com\/-WWIUpPCuTSE\/WD8lubQ_-BI\/AAAAAAAAEEQ\/HsNmOpBijysp68CNM60wWj-DuVo0MfHhgCLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B13-15-33.png\" \/><\/a><\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Ingresar nuevamente con usuario y contrase\u00f1a, y listo, ahora tendr\u00e1n la ventana de administraci\u00f3n del servidor de postgresql desde el navegador.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/4.bp.blogspot.com\/-DIY8uRoJpqk\/WD8cWBmH_tI\/AAAAAAAAEEA\/AyqencyOlfoOJsWCEgCd-ncwMyGmyUQgQCEw\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B12-35-58.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/4.bp.blogspot.com\/-DIY8uRoJpqk\/WD8cWBmH_tI\/AAAAAAAAEEA\/AyqencyOlfoOJsWCEgCd-ncwMyGmyUQgQCEw\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2016-11-30%2B12-35-58.png\" \/><\/a><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"text-align: right;\"><span style=\"font-size: large;\">Fuente:&nbsp;<a href=\"https:\/\/www.unixmen.com\/postgresql-9-4-released-install-centos-7\/\">https:\/\/www.unixmen.com\/postgresql-9-4-released-install-centos-7\/<\/a><\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>phpPgAdmin es una aplicaci\u00f3n web que provee una manera conveniente a los usuarios para crear bases de datos, tablas, alterarlas y consultar sus datos usando el lenguaje est\u00e1ndar SQL. phpPgAdmin estuvo basado en phpMyAdmin, pero hoy d\u00eda ya no comparte c\u00f3digo con \u00e9l; incluso provee las mismas funcionalidades y m\u00e1s a los usuarios del servidor [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[289,7,290,291,122,292],"tags":[],"class_list":["post-1514","post","type-post","status-publish","format-standard","hentry","category-9-6","category-fedora","category-navegador","category-phppgadmin","category-postgresql","category-web"],"_links":{"self":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/comments?post=1514"}],"version-history":[{"count":0,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1514\/revisions"}],"wp:attachment":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/media?parent=1514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/categories?post=1514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/tags?post=1514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}