This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sermn_wiki:userpages:marta:postgres [2008/11/26 14:17] marta |
sermn_wiki:userpages:marta:postgres [2020/07/09 12:30] miquel |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
+ | |||
+ | ===== PostgreSQL | ||
Servidor de base de dades relacionals. | Servidor de base de dades relacionals. | ||
+ | |||
+ | <WRAP important> | ||
+ | La informació d' | ||
+ | </ | ||
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> | + | |
- | + | ||
- | ==== Configuració | + | |
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: | |
- | * pg_hba.conf: | + | |
- | * pg_ident.conf: | + | |
- | * postgresql.conf: | + | |
=== pg_hba.conf === | === pg_hba.conf === | ||
+ | < | ||
# Database administrative login by UNIX sockets | # Database administrative login by UNIX sockets | ||
# local DATABASE | # local DATABASE | ||
Line 27: | Line 29: | ||
host | host | ||
host | host | ||
+ | </ | ||
=== postgres.conf === | === postgres.conf === | ||
+ | Les directives principals ha modificar són: | ||
+ | < | ||
# | # | ||
# CONNECTIONS AND AUTHENTICATION | # CONNECTIONS AND AUTHENTICATION | ||
# | # | ||
- | port = 5433 | + | port = 5432 |
max_connections = 100 | max_connections = 100 | ||
ssl = true | ssl = true | ||
+ | </ | ||
+ | |||
+ | En el cas de dos servidors postgres, com es el nostre cas, s'ha de canvia el número de port d'un d' | ||
+ | |||
+ | ==== Enllaços ==== | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | |||
+ | |||
===== PHPpgadmin ===== | ===== PHPpgadmin ===== | ||
+ | És una interficie web en PHP per gestionar les bases de dades PostgreSQL. És accessible a, | ||
+ | * [[http:// | ||
+ | |||
+ | ==== Instal·lació i configuració ==== | ||
+ | |||
+ | El primer de tot ens hem d' | ||
+ | |||
+ | Per començar istalem el paquet '' | ||
+ | |||
+ | Per tindre accés a l' | ||
+ | |||
+ | Ara toca editar la nostra configuració que es troba al fitxer / | ||
+ | < | ||
+ | <?php | ||
+ | // ------------------------Servidor PG 7.4----------------------------------------- | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | | ||
+ | // ------------------------Servidor PG 8.1----------------------------------------- | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | | ||
+ | // -----------------------General configuration------------------------------------ | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | | ||
+ | /* ----------------Don' | ||
+ | $conf[' | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | En el nostre cas, hi ha dos servidors als quals podem accedir des de l' | ||
+ | |||
+ | Si volem que qualsevol usuari que te permisos per utilitzar una base de dades la pugui veure des de l' | ||
+ | |||
+ | També cal incloure a les directives a la configuració de l' | ||
+ | |||
+ | ==== Enllaços ==== | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | ===== Altres eines per PostgreSQL ===== | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||