CentOS6 - phpPgAmdinをインストール

CentOS6にphpPgAdminを導入する手順を記す。

phpPgAdminの画面

確認環境
  • CentOS6.2(x86_64)
  • postgresql,httpd導入済
確認手順

(1) Fedora EPEL 6リポジトリを追加する

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm


(i386の場合)
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm

※EPELリポジトリは、Red Hat Enterprise Linux, Scientific Linux, CentOSの為に有志によって運営される拡張リポジトリ。ソースからとってくるくらいならこちらがお薦め。

(2) phpPgAdminほかパッケージ導入

# yum install phpPgAdmin php-pgsql

(3) /usr/share/phpPgAdmin/conf/config.inc.phpの編集(テスト接続用設定その1)

# diff config.inc.php config.inc.php.org 
88c88
< $conf['extra_login_security'] = false;
---
> $conf['extra_login_security'] = true;

※上が編集後、下が編集前

(4) /usr/lib/pgsql/data/pg_hba.confの編集(テスト接続用設定その2)

# diff pg_hba.conf pg_hba.conf.org 
70c70
< local   all         all                               trust
---
> local   all         all                               ident

※上が編集後、下が編集前

(5) postgresqlとhttpdを再起動

# service postgresql restart
# service httpd restart

(6) localhost/phpPgAdminにアクセスし、posgresユーザでパスワード無しでログイン


(7) 最後にテスト設定を元に戻し、postgresqlとhttpdを再起動

以上


コメント