PhpPgAdmin
From Alpine Linux
phpPgAdmin is a web-based administration tool for PostgreSQL.
Contents |
Install lighttpd, PHP, and postgresql
Install the additional packages:
apk add lighttpd php-common php-iconv php-json php-gd php-curl php-xml php-pgsql php-imap
apk add php-pdo php-pdo_pgsql php-soap php-xmlrpc php-posix php-mcrypt php-gettext php-ldap php-ctype php-dom
Configure Lighttpd
vi /etc/lighttpd/lighttpd.conf
Uncomment line:
include "mod_fastcgi.conf"
Start lighttpd service and add to needed runlevel
/etc/init.d/lighttpd start && rc-update add lighttpd default
Install extra packages
apk add postgresql postgresql-client php-pgsql
Configuring postgresql
/etc/init.d/postgresql setup
Starting http service and adding to boot.
/etc/init.d/postgresql start && rc-update add postgresql default
Installing phpPgAdmin
Make webapps folder
mkdir -p /usr/share/webapps/
Download the latest release of phpPgAdmin.
cd /usr/share/webapps/ wget http://downloads.sourceforge.net/phppgadmin/phpPgAdmin-5.0.4.tar.gz
Unpack and delete tar file
tar zxvf phpPgAdmin-5.0.2.tar.gz rm phpPgAdmin-5.0.4.tar.gz
Change folder name
mv phpPgAdmin-5.0.4 phppgadmin
Copy the sample config file name
cp /usr/share/webapps/phppgadmin/conf/config.inc.php-dist /usr/share/webapps/phppgadmin/conf/config.inc.php
Change folder permissions
chmod -R 777 /usr/share/webapps/
Make symlink to the phpPgAdmin folder
ln -s /usr/share/webapps/phppgadmin/ /var/www/localhost/htdocs/phppgadmin
Log on your phpPgAdmin
Browse to: http://WEBSERVER_IP_ADDRESS/phppgadmin and logon to phpPgAdmin using postgresql user and password.