From Alpine Linux
Revision as of 13:18, 22 January 2013 by Fab (talk | contribs) (Installing phpPgAdmin)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

phpPgAdmin is a web-based administration tool for PostgreSQL.

Install lighttpd, PHP, and postgresql

For installing the additional packages first activate community packages:

vi /etc/apk/repositories

Uncomment the following:

Update the packagelist:

apk update

Install the additional packages:

apk add lighttpd php7-common php7-iconv php7-json php7-gd php7-curl php7-xml php7-mysqli php7-imap php7-cgi fcgi php7-pdo php7-pdo_mysql php7-soap php7-xmlrpc php7-posix php7-mcrypt php7-gettext php7-ldap php7-ctype php7-dom

Configure Lighttpd

Edit lighttpd.conf

vi /etc/lighttpd/lighttpd.conf

Uncomment line:

include "mod_fastcgi.conf"

Edit mod_fastcgi.conf

vi /etc/lighttpd/mod_fastcgi.conf

Edit the section:




Start lighttpd service and add to needed runlevel

rc-service 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

Create a directory named webapps

mkdir -p /usr/share/webapps/

Download the latest release of phpPgAdmin.

cd /usr/share/webapps/ wget

Unpack and delete the tar file

tar zxvf phpPgAdmin-5.0.2.tar.gz rm phpPgAdmin-5.0.4.tar.gz

Change the folder name

mv phpPgAdmin-5.0.4 phppgadmin

Copy the sample config file name

cp /usr/share/webapps/phppgadmin/conf/ /usr/share/webapps/phppgadmin/conf/

Change the folder permissions

chmod -R 777 /usr/share/webapps/

Create a 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.

Note: If you are using the Alpine ACF, or if you change the port in the lighttpd.conf file, the go to the port you set. e.g: if you set the port to 8080, then browse to: http://WEBSERVER_IP_ADDRESS:8080/phppgadmin