- 利用 phpPgAdmin 管理 PostgreSQL Server!
-
調整 SELinux 設定值:
#setsebool -P httpd_can_network_connect_db 1
-
調整 PostgreSQL Server 設定值:
#vim /var/lib/pgsql/data/postgresql.conf listen_addresses = '*' port = 5432
-
重新啟動 PostgreSQL Server:
#systemctl restart postgresql
-
安裝 phpPgAdmin:
#yum install phpPgAdmin php-pgsql
-
編修 Web Server 設定檔:
#vim /etc/httpd/conf.d/phpPgAdmin.conf [...省略...] Alias /phpPgAdmin /usr/share/phpPgAdmin <Location /phpPgAdmin> <IfModule mod_authz_core.c> # Apache 2.4 Require all granted #Require host example.com </IfModule> [...省略...] </Location> [...省略...]
-
重新啟動 Web Server:
#systemctl restart httpd
-
編修 phpPgAdmin 設定檔:
#vim /etc/phpPgAdmin/config.inc.php (只編修下列設定檔內容,其餘保留不動作!) $conf['servers'][0]['host'] = 'localhost'; $conf['extra_login_security'] = false; $conf['owned_only'] = true;
-
連線至 phpPgAdmin :
#firefox http://localhost/phpPgAdmin
參考文獻:
- http://www.unixmen.com/postgresql-9-4-released-install-centos-7/
- http://www.server-world.info/en/note?os=CentOS_7&p=postgresql&f=1
- http://www.server-world.info/en/note?os=CentOS_7&p=postgresql&f=2