phppgadminの導入方法

1.本体をダウンロード
http://phppgadmin.sourceforge.net/doku.php?id=download

(例)phpPgAdmin-5.0.3.tar.gz


2.FTPなどでアップロード+解凍

$ chmod 755 phpPgAdmin-5.0.3.tar.gz
$ tar zxvfp phpPgAdmin-5.0.3.tar.gz

pは圧縮したときのパーミッションの設定を再現


3.ユーザー追加

$ su postgres

$ createuser <ユーザ名>
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n


4.追加したユーザーにパスワード発行
psql
alter user <ユーザ名> password '<パスワード>';


5.postgresqlのローカルコネクションの場合の判定をIPで指定

vi /var/lib/pgsql/data/pg_hba.conf

# IPv4 local connections:
host all all 127.0.0.1/32 ident sameuser

host all all 127.0.0.1 255.255.255.255 trust


6.phppgadminのconfigを編集

vi conf/config.inc.php

$conf['servers'][0]['host'] = '127.0.0.1';


OK!