User Tools

Site Tools


sermn_wiki:userpages:marta:postgres

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sermn_wiki:userpages:marta:postgres [2008/11/27 12:09]
marta
sermn_wiki:userpages:marta:postgres [2020/07/09 12:30] (current)
miquel
Line 1: Line 1:
-====== Postgres ======+====== PostgreSQL i PHPPgAdmin ====== 
 + 
 +===== PostgreSQL =====
  
 Servidor de base de dades relacionals. Servidor de base de dades relacionals.
 +
 +<WRAP important>
 +La informació d'aquesta pàgina s'ha d'actualitzar
 +</WRAP>
  
 Actualment el servidor disposa de dos servidors de bases de dades postgres (versió 7.4 i 8.1). Actualment el servidor disposa de dos servidors de bases de dades postgres (versió 7.4 i 8.1).
  
-===== Instal·lació i configuració ====+==== Instal·lació i configuració ====
- +
-<note important> ¡En construcción!</note>+
  
 El comportament de PostgreSQL al nostre sistema es pot controlar amb tres fitxers de configuració: El comportament de PostgreSQL al nostre sistema es pot controlar amb tres fitxers de configuració:
- +   * pg_hba.conf: Aquest fitxer s'utilitza per definir els diferents tipus d'accessos que té un usuari (com, on i des de quin lloc). 
-    * pg_hba.conf:   Aquest fitxer s'utilitza per definir els diferents tipus d'accesos que té un usuari (com, on i des de quin lloc). +   * pg_ident.conf: Aquest fitxer s'utilitza per definir la informació necessària en cas que utilitzem un accés del tipus ident a //pg_hba.conf//
-    * pg_ident.conf: Aquest fitxer s'utilitza per definir la informació necessaria en cas que utilitzem un acces del tipus ident a pg_hba.conf . +   * postgresql.conf: En aquest fitxer podem canviar tots els paràmetres de configuració que afecten al funcionament i comportament de PostgreSQL a la nostra màquina.
-    * postgresql.conf: En aqueste fitxer podem canviar tots els paràmetres de configuració que afecten al funcionament i comportament de PostgreSQL a la nostra màquina.+
  
 === pg_hba.conf === === pg_hba.conf ===
  
 +<file>
   # Database administrative login by UNIX sockets   # Database administrative login by UNIX sockets
   # local    DATABASE    USER                         METHOD     [OPTION]   # local    DATABASE    USER                         METHOD     [OPTION]
Line 25: Line 29:
     host     all         all         127.0.0.1/32     md5     host     all         all         127.0.0.1/32     md5
     host     all         all         ::1/128          md5     host     all         all         ::1/128          md5
 +</file>
  
 === postgres.conf === === postgres.conf ===
 +
 Les directives principals ha modificar són: Les directives principals ha modificar són:
 +<file>
   #---------------------------------------------------------------------------   #---------------------------------------------------------------------------
   # CONNECTIONS AND AUTHENTICATION   # CONNECTIONS AND AUTHENTICATION
Line 34: Line 41:
   max_connections = 100   max_connections = 100
   ssl = true   ssl = true
 +</file>
  
 En el cas de dos servidors postgres, com es el nostre cas, s'ha de canvia el número de port d'un d'ells. En el cas de dos servidors postgres, com es el nostre cas, s'ha de canvia el número de port d'un d'ells.
  
-===== Enllaços =====+==== Enllaços ====
  
-[[http://www.postgresql.org/web oficial de PostgreSQL]]+  * [[http://www.postgresql.org/Web oficial de PostgreSQL]] 
 +  * [[http://www.postgresql.org/docs/manuals/ | Manuals de PostgreSQL]] 
 +    * [[http://wiki.postgresql.org/wiki/Detailed_installation_guides | Detailed installation guides]] 
 +  * [[http://www.commandprompt.com/ppbook/ | Practical PostgreSQL,]] by John Worsley and Joshua Drake, Command Prompt, Inc. Copyright © 2001-2002 by Commandprompt, Inc
  
-[[http://www.postgresql.org/docs/manuals/ | manuals de PostgreSQL]] 
  
-[[http://www.sobl.org/traducciones/practical-postgres/practical-postgres.html | PostgreSQL Práctico]] - llibre online 
  
  
-====== PHPpgadmin ====== 
  
-És una interficie web en PHP per gestionar les bases de dades PostgreSQL.+===== PHPpgadmin =====
  
-[[http://cie-58-175.uab.cat | phppgadmin]]+És una interficie web en PHP per gestionar les bases de dades PostgreSQL. És accessible a, 
 +  * [[http://cie-58-175.uab.cat | phppgadmin]]
  
-===== Instal·lació i configuració =====+==== Instal·lació i configuració ====
  
 El primer de tot ens hem d'assegurar que el nostre servidor soporta [[..:marta:php | PHP]].  El primer de tot ens hem d'assegurar que el nostre servidor soporta [[..:marta:php | PHP]]. 
Line 61: Line 70:
  
 Ara toca editar la nostra configuració que es troba al fitxer /etc/phppgadmin/config.inc.php i ha de quedar amb el següent contigut: Ara toca editar la nostra configuració que es troba al fitxer /etc/phppgadmin/config.inc.php i ha de quedar amb el següent contigut:
 +<file>
   <?php   <?php
   // ------------------------Servidor PG 7.4-----------------------------------------   // ------------------------Servidor PG 7.4-----------------------------------------
Line 103: Line 112:
     $conf['version'] = 15;     $conf['version'] = 15;
   ?>   ?>
 +</file>
 +
 +En el nostre cas, hi ha dos servidors als quals podem accedir des de l'aplicació. S'ha d'anar en compte amb l'índex del servidor i el número de por que hem assignat a la configuració del servidor.
 +
 +Si volem que qualsevol usuari que te permisos per utilitzar una base de dades la pugui veure des de l'aplicació, hem de vigilar que el paràmetre ''owned_only'' sigui <color blue>fals</color>.
 +
 +També cal incloure a les directives a la configuració de l'apache (apache.conf): ''Allow from localhost''
 +
 +==== Enllaços ====
  
-En el nostre cas, hi ha dos servidors als quals podem accedir desde l'apicacióS'ha d'anar en compte amb l'índex del servidor i el número de por que hem assignat a la configuració del servidor.+[[http://www.phppgadmin.org/ | web oficial de PHPpgadmin ]]
  
-Si volem que qualsevol usuari que te permisos per utilitzar una base de dades la pugui veure desde l'apliació, hem de vigilar que el parametre ''owned_only'' sigui <color blue>fals</color>.+===== Altres eines per PostgreSQL =====
  
-També cal incloure les directives la configuració de l'apache (apache.conf) :+  * [[http://www.pgadmin.org/ | pgAdmin]] is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. pgAdmin is designed to answer the needs of all users, from writing simple SQL queries to developing complex databases. The graphical interface supports all PostgreSQL features and makes administration easy. The application also includes syntax highlighting SQL editor, server-side code editor, an SQL/batch/shell job scheduling agent, support for the Slony-I replication engine and much moreServer connection may be made using TCP/IP or Unix Domain Sockets (on *nix platforms), and may be SSL encrypted for security. No additional drivers are required to communicate with the database server. 
 +  * [[http://www.dbvis.com/ | DbVisualizer DbVisualizer]] is the universal database tool for developers and database administrators. It is the perfect solution since the same tool can be used on all major operating systems accessing a wide range of databases. DbVisualizer is the universal database tool for developers and database administrators. It is the perfect solution since the same tool can be used on all major operating systems accessing a wide range of databases. 
 +  * [[http://www.teampostgresql.com/ | TeamPostgreSQL]] allows database administrators to manage their PostgreSQL databases from anywhere. 
 +  * [[http://www.navicat.com/ | Navicat]] for PostgreSQL is a powerful Database administration and development tool for PostgreSQL. It works with any PostgreSQL Database Server from version 7.3 or above, and supports most of the latest PostgreSQL features including Trigger, Function, View, and Manage User, etc. Features in Navicat are sophisticated enough to provide professional developers for all their specific needs, yet easy to learn for users who are new to PostgreSQL. 
 +  * [[http://www.sqlmanager.net/ | EMS SQL Management Studio]] is a complete solution for database administration and development. SQL Studio unites all must-have components that focus on the most critical database management tasks in one powerful and easy-to-use environment that can work round the clock. Whether you are a database or application developer, DBA or business analyst, EMS SQL Management Studio offers all essential tools to make you more productive than ever before!
  
-  Allow from localhost 
sermn_wiki/userpages/marta/postgres.1227784180.txt.gz · Last modified: 2008/11/27 12:09 by marta