PostgreSQL 16 : Install phpPgAdmin2024/05/30 |
Install phpPgAdmin to operate PostgreSQL on web browser from Client computers. |
|
[1] | |
[2] | |
[3] | Install phpPgAdmin. |
root@www:~#
apt -y install phppgadmin php-pgsql
root@www:~#
vi /etc/phppgadmin/config.inc.php # line 114 : change to [false] if you allow to login with privileged user like postgres, root $conf['extra_login_security'] = true; # line 120 : change to [true] if you set config that database owners can look only their own databases $conf['owned_only'] = false;
root@www:~#
vi /usr/share/phppgadmin/classes/database/Connection.php # line 78 : add PostgreSQL 16 switch (substr($version,0,2)) { case '16': return 'Postgres';break; case '14': return 'Postgres';break; case '13': return 'Postgres13';break; case '12': return 'Postgres12';break; case '11': return 'Postgres11';break; case '10': return 'Postgres10';break;
root@www:~#
vi /etc/apache2/conf-enabled/phppgadmin.conf # line 12 : set access permission for phpPgAdmin Require local
Require ip 10.0.0.0/24
systemctl reload apache2 |
[4] | Access to [http://(server's hostname or IP address)/phppgadmin/] with web browser from any Clients which are in the Network you set to allow. Then phpPgAdmin site is shown, Click [PostgreSQL] link on the left pane. |
[5] | Authenticate as a user and password which is in PostgreSQL. |
[6] | After successing authentication, phpPgAdmin admin site is shown. It's possible to operate PostgreSQL databases on here. |
Sponsored Link |