PostgreSQL La base de donnees la plus sophistiquee au monde.

Forums PostgreSQL.fr

Le forum officiel de la communauté francophone de PostgreSQL

Vous n'êtes pas identifié(e).

#1 28/03/2009 19:35:58

profem
Membre

Installer Postgresql sur Debian Lenny, repertoire data

Bonjour,
Sur la dernière distribution Debian, lenny, j'ai préinstallé postgresql à l'installation de ma disribution (version 8.3.6-1 de postgresql), mais postgresql ne tourne pas.
Il y a plusieurs paquets: postgresql, postgresql-common et postgresql-8.3. client et serveur, c'est plusieurs version de postgresql?
N'étant pas un spécialiste système et SGBDR quoi que, mais plutôt un développeur sql python, pour ne pas faire de bétises j'aimerais avoir vos conseils sur la configuration sur une distribution linux sous debian. J'ai suivit la doc pg83 qui me sert énormement, c'est pas commode avec les repertoires qui changent et l'arborescence linux, cela pourrais peut être servir à d'autres utilisateurs. Comme j'avais les paquets installés j'ai zapper la compil, pour une fois. Les repertoires où se trouvent postgresql:

/etc/postgresql vide
###############
ls /etc/postgresql-common
 	autovacuum.conf  pg_upgradecluster.d  root.crt	user_clusters
por faire le ménage
###############
user:/usr/share/postgresql/8.3# ls
	contrib			pg_service.conf		recovery.conf
	conversion_create.sql	pg_service.conf.sample	recovery.conf.sample
	information_schema.sql	postgres.bki		snowball_create.sql
	man			postgres.description	sql_features.txt
	pg_hba.conf		postgresql.conf		system_views.sql
	pg_hba.conf.sample	postgresql.conf.sample	timezonesets
	pg_ident.conf		postgres.shdescription	tsearch_data
	pg_ident.conf.sample	psqlrc.sample
Ici les fichiers de config
###############
/var/lib/postgresql vide
###############
/etc/init.d/postgresql-8.3
J'ai fais /etc/init.d/postgresql-8.3 start. rien pas de [ok]
pas de processus postmaster.
###############
ls /usr/share/postgresql-common
init.d-functions	pg_wrapper	     testsuite
maintscripts-functions	run-upgrade-scripts  upgrade-scripts
pg_checksystem		supported-versions
PgCommon.pm		t
###############

Si je me base sur la doc je dois créer un répertoire data dans /usr/local/pgsql/
Il n'y a pas de repertoires /usr/local/pgsql (pgsql pour postgresql) mais il y a un repertoire /var/lib/postgresql vide prévu? dans la doc l'emplacement du data est libre.
C'est dans le data que se trouve les bases?

Une première fois j'ai créé le data je sais plus où, je crois dans :
/usr/lib/postgresql/8.3/bin/initdb -D /usr/local/postgresql/8.3/data
/etc/ini.d/postgres-8.3 -D /usr/local/postgresql/8.3/data >logfile 2>&1 &

initdb va initialiser la base postgres initiale.
J'ai voulu reinstaller postgresql8.3 cela m'a corrompu le paquet. J'étais bien embété. Peut être à cause du cd debian
J'ai bien créer la connexion avec pgadmin. J'ai les solutions mais j'ai peur de les appliquer.





#adduser postgres
adduser : L'utilisateur « postgres » existe déjà.
J'ai changer le mot de passe sous root en postgres pour tester car postgres il ne reconnait pas au départ. postgres n'est pas un utilisateur système. une fois sous postgres@...$ requete ALTER USER postgres ENCRYPTED PASSWORD 'mon_mot_de_passe'; il dois y avoir 2 mots de passes, un système, l'autre pour la base postgres.
su - postgres 
postgres@PC-de-...:~$ 
Le sudo -su ne marche pas. Va savoir...
$ sudo su -postgres

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for user: 
postgres marche pas...
Donc su -postgres avec postgres bien
après,
je ma place dans /usr/lib/postgresql/8.3
ls
bin & lib
j'ai psql et creatuser
$ psql
psql: could not connect to server: Aucun fichier ou répertoire de ce type
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
ça marche pas

Un autre problème les fichiers de config de /usr/share/postgresql/8.3

mes fichiers config de 
pg_hba.conf:
#host    all         all         127.0.0.1/32          @authmethod@
host    all         all         127.0.0.1/32          sameuser ou password ou trust ou md5?

# IPv6 local connections:

#host    all         all         ::1/128               @authmethod@
host    all         all         ::1/128               md5
Le poste Les galères du débutant va peut être m'aider
postgres.conf:
listen_addresses = 'localhost'
port = 5432
bonjour_name = 'Bonjour PostgreSQL' # il faut rester polis
la configuration des ressources tout en commenataire pour le moment
Je sais pas trop faire.Sur un autre poste Debian etch j'avais postgresql 8.1. Je dois gérer une application en python qui utilise comme SGBDR postgres avec des utilisateurs avec des accés concurrents. Je sais pas si les erreurs de concurrences proviennent de la config mémoire qui est en commentaire donc pas optimisé pour un certain nombres d'utilisateurs (qui n'y connaissent rien à l'informatique au passage,) ou bien cela provient du code.dois je toucher au /etc/sysctl.conf et les parametres de pg.conf au risque de bloquer la base. Necessité peut être d'ajouter des verrous. Mais cela nécessite un autre post.

J'aimerais aussi faire tourner aussi une version de postgresql à savoir postgresql8.1 sur le même poste, je me demande si cela étais faisable? et faire tourner soit l'une soit l'autre, car sur lenny j'ai que la version 8.3, les paquets 8.1 n'y figure plus et je dois alors installer 8.1 et le problème de dépendances. où: dans /usr/share/postgresql/8.1? l'ini.d/postgresql8.1 va se créer?
Pour résumé c'est l'emplacement de data qui me tracase en premier lieu.
Merci

Hors ligne

#2 28/03/2009 23:32:42

gleu
Administrateur

Re : Installer Postgresql sur Debian Lenny, repertoire data

Beaucoup trop de trucs pour un même poste. Commençons par le début. Vous devez installer PostgreSQL avec les paquets Debian.

postgresql-8.3 : le serveur
postgresql-client-8.3 : les programmes clients (psql, pg_dump, etc.)
postgresql-contrib-8.3: modules contrib
postgresql-doc-8.3 : documentation
postgresql-plperl-8.3 : langage procédural PL/Perl pour PostgreSQL 8.3
postgresql-plpython-8.3 : langage procédural PL/Python pour PostgreSQL 8.3
postgresql-pltcl-8.3 : langage procédural PL/Tcl pour PostgreSQL 8.3
postgresql-server-dev-8.3 : fichiers pour le développement avec PostgreSQL

Bref, les paquets intéressants sont postgresql-8.3 et postgresql-8.3-client.

Une fois installé, le répertoire /etc/postgresql doit avoir un répertoire 8.3 qui doit contenir un répertoire main qui doit contenir les fichiers de configuration. Le répertoire /var/lib/postgresql/8.3 doit aussi être créé. Il doit contenir un répertoire main qui doit contenir les répertoires et fichiers du cluster.

Commencez donc par installer (ou ré-installer) les deux paquets intéressants et vérifiez si vous avez bien les répertoires et fichiers indiqués ci-dessus.


Guillaume.

Hors ligne

#3 29/03/2009 02:18:42

profem
Membre

Re : Installer Postgresql sur Debian Lenny, repertoire data

Le repertoire  /etc/postgresql n'a pas de  8.3. Le répertoire /var/lib/postgresql/ est vide lui aussi. Tous les paquets de postgresql se placent dans /usr/share/postgresl/8.3 et /usr/lib/postgresql/8.3/ et pas de main nul part.

Dois je récupérer la version le site de Postgresql le .bin 8.3.7 plus ou le 8.3.6 du site francophone, plus recent . Le paquet Debian 5.0.0 amd64 ne place pas les paquets au bon endroit.
>par exemple pour postgresql-8.3 le serveur fichiers instllé depuis synaptic:
-------------------------------------------------------------------------------------------------

/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/postgresql-8.3
/usr/share/doc/postgresql-8.3/changelog.gz
/usr/share/doc/postgresql-8.3/copyright
/usr/share/doc/postgresql-8.3/README
/usr/share/doc/postgresql-8.3/changelog.Debian.gz
/usr/share/postgresql
/usr/share/postgresql/8.3
/usr/share/postgresql/8.3/sql_features.txt
/usr/share/postgresql/8.3/system_views.sql
/usr/share/postgresql/8.3/snowball_create.sql
/usr/share/postgresql/8.3/postgresql.conf.sample
/usr/share/postgresql/8.3/information_schema.sql
/usr/share/postgresql/8.3/pg_ident.conf.sample
/usr/share/postgresql/8.3/conversion_create.sql
/usr/share/postgresql/8.3/tsearch_data
/usr/share/postgresql/8.3/tsearch_data/finnish.stop
/usr/share/postgresql/8.3/tsearch_data/turkish.stop
/usr/share/postgresql/8.3/tsearch_data/danish.stop
/usr/share/postgresql/8.3/tsearch_data/italian.stop
/usr/share/postgresql/8.3/tsearch_data/spanish.stop
/usr/share/postgresql/8.3/tsearch_data/portuguese.stop
/usr/share/postgresql/8.3/tsearch_data/french.stop
/usr/share/postgresql/8.3/tsearch_data/ispell_sample.dict
/usr/share/postgresql/8.3/tsearch_data/xsyn_sample.rules
/usr/share/postgresql/8.3/tsearch_data/german.stop
/usr/share/postgresql/8.3/tsearch_data/norwegian.stop
/usr/share/postgresql/8.3/tsearch_data/swedish.stop
/usr/share/postgresql/8.3/tsearch_data/english.stop
/usr/share/postgresql/8.3/tsearch_data/ispell_sample.affix
/usr/share/postgresql/8.3/tsearch_data/hungarian.stop
/usr/share/postgresql/8.3/tsearch_data/russian.stop
/usr/share/postgresql/8.3/tsearch_data/dutch.stop
/usr/share/postgresql/8.3/tsearch_data/thesaurus_sample.ths
/usr/share/postgresql/8.3/tsearch_data/synonym_sample.syn
/usr/share/postgresql/8.3/tsearch_data/hunspell_sample.affix
/usr/share/postgresql/8.3/recovery.conf.sample
/usr/share/postgresql/8.3/pg_service.conf.sample
/usr/share/postgresql/8.3/pg_hba.conf.sample
/usr/share/postgresql/8.3/timezonesets
/usr/share/postgresql/8.3/timezonesets/Etc.txt
/usr/share/postgresql/8.3/timezonesets/Australia.txt
/usr/share/postgresql/8.3/timezonesets/Australia
/usr/share/postgresql/8.3/timezonesets/India
/usr/share/postgresql/8.3/timezonesets/Antarctica.txt
/usr/share/postgresql/8.3/timezonesets/Atlantic.txt
/usr/share/postgresql/8.3/timezonesets/Asia.txt
/usr/share/postgresql/8.3/timezonesets/America.txt
/usr/share/postgresql/8.3/timezonesets/Default
/usr/share/postgresql/8.3/timezonesets/Pacific.txt
/usr/share/postgresql/8.3/timezonesets/Europe.txt
/usr/share/postgresql/8.3/timezonesets/Africa.txt
/usr/share/postgresql/8.3/timezonesets/Indian.txt
/usr/share/postgresql/8.3/postgres.description
/usr/share/postgresql/8.3/postgres.shdescription
/usr/share/postgresql/8.3/postgres.bki
/usr/share/postgresql/8.3/man
/usr/share/postgresql/8.3/man/man1
/usr/share/postgresql/8.3/man/man1/initdb.1.gz
/usr/share/postgresql/8.3/man/man1/pg_ctl.1.gz
/usr/share/postgresql/8.3/man/man1/postgres.1.gz
/usr/share/postgresql/8.3/man/man1/pg_controldata.1.gz
/usr/share/postgresql/8.3/man/man1/ipcclean.1.gz
/usr/share/postgresql/8.3/man/man1/pg_resetxlog.1.gz
/usr/share/postgresql/8.3/man/man1/postmaster.1.gz
/usr/share/locale
/usr/share/locale/tr
/usr/share/locale/tr/LC_MESSAGES
/usr/share/locale/tr/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/tr/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/tr/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/tr/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/tr/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/zh_TW
/usr/share/locale/zh_TW/LC_MESSAGES
/usr/share/locale/zh_TW/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/zh_TW/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/zh_TW/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/zh_TW/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/zh_TW/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/sv
/usr/share/locale/sv/LC_MESSAGES
/usr/share/locale/sv/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/sv/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/sv/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/sv/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/sv/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/sl
/usr/share/locale/sl/LC_MESSAGES
/usr/share/locale/sl/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/sl/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/sl/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/sl/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/sl/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/hu
/usr/share/locale/hu/LC_MESSAGES
/usr/share/locale/hu/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/hu/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/hu/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/nb
/usr/share/locale/nb/LC_MESSAGES
/usr/share/locale/nb/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/nb/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/nb/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/zh_CN
/usr/share/locale/zh_CN/LC_MESSAGES
/usr/share/locale/zh_CN/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/zh_CN/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/zh_CN/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/zh_CN/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/zh_CN/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/es
/usr/share/locale/es/LC_MESSAGES
/usr/share/locale/es/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/es/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/es/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/es/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/es/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/pl
/usr/share/locale/pl/LC_MESSAGES
/usr/share/locale/pl/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/pl/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/pl/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/de
/usr/share/locale/de/LC_MESSAGES
/usr/share/locale/de/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/de/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/de/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/de/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/de/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/af
/usr/share/locale/af/LC_MESSAGES
/usr/share/locale/af/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/it
/usr/share/locale/it/LC_MESSAGES
/usr/share/locale/it/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/it/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/it/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/it/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/fr
/usr/share/locale/fr/LC_MESSAGES
/usr/share/locale/fr/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/fr/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/fr/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/fr/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/fr/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/ru
/usr/share/locale/ru/LC_MESSAGES
/usr/share/locale/ru/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/ru/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/ru/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/ru/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/ru/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/hr
/usr/share/locale/hr/LC_MESSAGES
/usr/share/locale/hr/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/nl
/usr/share/locale/nl/LC_MESSAGES
/usr/share/locale/nl/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/pt_BR
/usr/share/locale/pt_BR/LC_MESSAGES
/usr/share/locale/pt_BR/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/pt_BR/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/pt_BR/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/pt_BR/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/pt_BR/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/ko
/usr/share/locale/ko/LC_MESSAGES
/usr/share/locale/ko/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/ko/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/ko/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/ko/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/ko/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/ro
/usr/share/locale/ro/LC_MESSAGES
/usr/share/locale/ro/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/ro/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/ro/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/ro/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/ro/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/fa
/usr/share/locale/fa/LC_MESSAGES
/usr/share/locale/fa/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/cs
/usr/share/locale/cs/LC_MESSAGES
/usr/share/locale/cs/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/cs/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/cs/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/cs/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/cs/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/sk
/usr/share/locale/sk/LC_MESSAGES
/usr/share/locale/sk/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/sk/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/sk/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/sk/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/share/locale/sk/LC_MESSAGES/postgres-8.3.mo
/usr/share/locale/ta
/usr/share/locale/ta/LC_MESSAGES
/usr/share/locale/ta/LC_MESSAGES/pg_controldata-8.3.mo
/usr/share/locale/ta/LC_MESSAGES/pg_ctl-8.3.mo
/usr/share/locale/ta/LC_MESSAGES/initdb-8.3.mo
/usr/share/locale/ta/LC_MESSAGES/pg_resetxlog-8.3.mo
/usr/lib
/usr/lib/postgresql
/usr/lib/postgresql/8.3
/usr/lib/postgresql/8.3/lib
/usr/lib/postgresql/8.3/lib/ascii_and_mic.so
/usr/lib/postgresql/8.3/lib/utf8_and_gbk.so
/usr/lib/postgresql/8.3/lib/utf8_and_euc_tw.so
/usr/lib/postgresql/8.3/lib/utf8_and_uhc.so
/usr/lib/postgresql/8.3/lib/utf8_and_euc_jis_2004.so
/usr/lib/postgresql/8.3/lib/dict_snowball.so
/usr/lib/postgresql/8.3/lib/utf8_and_euc_cn.so
/usr/lib/postgresql/8.3/lib/utf8_and_gb18030.so
/usr/lib/postgresql/8.3/lib/latin_and_mic.so
/usr/lib/postgresql/8.3/lib/euc_tw_and_big5.so
/usr/lib/postgresql/8.3/lib/utf8_and_shift_jis_2004.so
/usr/lib/postgresql/8.3/lib/euc_kr_and_mic.so
/usr/lib/postgresql/8.3/lib/euc_cn_and_mic.so
/usr/lib/postgresql/8.3/lib/utf8_and_johab.so
/usr/lib/postgresql/8.3/lib/utf8_and_big5.so
/usr/lib/postgresql/8.3/lib/utf8_and_iso8859.so
/usr/lib/postgresql/8.3/lib/utf8_and_euc_jp.so
/usr/lib/postgresql/8.3/lib/utf8_and_ascii.so
/usr/lib/postgresql/8.3/lib/euc_jis_2004_and_shift_jis_2004.so
/usr/lib/postgresql/8.3/lib/latin2_and_win1250.so
/usr/lib/postgresql/8.3/lib/utf8_and_sjis.so
/usr/lib/postgresql/8.3/lib/utf8_and_cyrillic.so
/usr/lib/postgresql/8.3/lib/plpgsql.so
/usr/lib/postgresql/8.3/lib/utf8_and_iso8859_1.so
/usr/lib/postgresql/8.3/lib/tsearch2.so
/usr/lib/postgresql/8.3/lib/euc_jp_and_sjis.so
/usr/lib/postgresql/8.3/lib/utf8_and_win.so
/usr/lib/postgresql/8.3/lib/utf8_and_euc_kr.so
/usr/lib/postgresql/8.3/lib/cyrillic_and_mic.so
/usr/lib/postgresql/8.3/bin
/usr/lib/postgresql/8.3/bin/pg_ctl
/usr/lib/postgresql/8.3/bin/ipcclean
/usr/lib/postgresql/8.3/bin/pg_resetxlog
/usr/lib/postgresql/8.3/bin/pg_controldata
/usr/lib/postgresql/8.3/bin/initdb
/usr/lib/postgresql/8.3/bin/postgres
/etc
/etc/init.d
/etc/init.d/postgresql-8.3
/usr/share/doc/postgresql-8.3/README.Debian.gz
/usr/lib/postgresql/8.3/bin/postmaster

Hors ligne

#4 29/03/2009 08:44:58

flo
Membre

Re : Installer Postgresql sur Debian Lenny, repertoire data

Quel est le résultat de la commande :
ps -ef | grep postgres

?

Hors ligne

#5 29/03/2009 09:20:35

gleu
Administrateur

Re : Installer Postgresql sur Debian Lenny, repertoire data

Que donne la commande pg_lsclusters ? à exécuter en tant qu'utilisateur root.

Chez moi, elle affiche :

root@laptop:~# pg_lsclusters
Version Cluster   Port Status Owner    Data directory                     Log file
8.3     main      5433 online postgres /var/lib/postgresql/8.3/main       /var/log/postgresql/postgresql-8.3-main.log

Guillaume.

Hors ligne

#6 29/03/2009 14:10:28

profem
Membre

Re : Installer Postgresql sur Debian Lenny, repertoire data

# ps -ef | grep postgres
root      4605  4603  0 14:02 pts/1    00:00:00 grep postgres
PC-de-mh:~# pg_lsclusters
Version Cluster   Port Status Owner    Data directory                     Log file
PC-de-mh:~#

Hors ligne

#7 29/03/2009 16:36:30

gleu
Administrateur

Re : Installer Postgresql sur Debian Lenny, repertoire data

Alors il faut essayer de créer un cluster :

pg_createcluster 8.3 main

Guillaume.

Hors ligne

#8 31/03/2009 21:19:13

profem
Membre

Re : Installer Postgresql sur Debian Lenny, repertoire data

Super ça fonctionne

OPENERP:/etc/postgresql# pg_createcluster 8.3 main
Creating new cluster (configuration: /etc/postgresql/8.3/main, data: /var/lib/postgresql/8.3/main)...
Moving configuration file /var/lib/postgresql/8.3/main/postgresql.conf to /etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_hba.conf to /etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_ident.conf to /etc/postgresql/8.3/main...
Configuring postgresql.conf to use port 5432...
OPENERP:/etc/postgresql# ps -ef | grep postgres
root      3588  3422  0 10:09 pts/0    00:00:00 grep postgres
OPENERP:/etc/postgresql# pg_lsclusters
Version Cluster   Port Status Owner    Data directory                     Log file
8.3     main      5432 down   postgres /var/lib/postgresql/8.3/main       /var/log/postgresql/postgresql-8.3-main.log
OPENERP:/etc/postgresql/8.3/main# ls
environment  pg_hba.conf  pg_ident.conf  postgresql.conf  start.conf

J'ai vu la page de man de pg_createcluster, cela sert pour la création du serveur. J'ai pas rajouté --start à la fin. Le serveur marche en tous les cas j'ai lancer par /etc/init.d/postgresql-8.3 start
Après start:

OPENERP:/etc/postgresql/8.3/main# ps -ef | grep postgres
postgres  3679     1  0 10:16 ?        00:00:00 /usr/lib/postgresql/8.3/bin/postgres -D /var/lib/postgresql/8.3/main -c config_file=/etc/postgresql/8.3/main/postgresql.conf
postgres  3681  3679  0 10:16 ?        00:00:00 postgres: writer process                                                                                                    
postgres  3682  3679  0 10:16 ?        00:00:00 postgres: wal writer process                                                                                                
postgres  3683  3679  0 10:16 ?        00:00:00 postgres: autovacuum launcher process                                                                                       
postgres  3684  3679  0 10:16 ?        00:00:00 postgres: stats collector process

Par contre où se trouve le fichier de log
et le postmaster, cest pas le processus de postgresql


Dans le man on peut utiliser initdb. Dois je mettre des droits d'accès postgres au main.
On peut donc créer autant de serveur (cluster) que l'on veut en changeant les config?
Merci les gars

Hors ligne

#9 01/04/2009 00:14:08

gleu
Administrateur

Re : Installer Postgresql sur Debian Lenny, repertoire data

postmaster est l'ancien nom du processus postgres.

Le pg_createcluster de Debian utilise initdb, donc pas besoin de l'utiliser. Pour créer plusieurs clusters avec Debian, il suffit de leur donner des noms différents (le premier ayant été appelé main). Attention, cela demandera certainement des modifs mémoire.


Guillaume.

Hors ligne

Pied de page des forums