Debian 12 bookworm
Sponsored Link

PostgreSQL 15 : Install phpPgAdmin2023/07/05

 
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 105 : change to [false] if you allow to login with privileged user like postgres, root

$conf['extra_login_security'] = true;
# line 111 : 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 79 : add PostgreSQL 15
        switch (substr($version,0,2)) {
            case '15': 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
root@www:~#
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.
Matched Content