PhpPgAdmin: Difference between revisions
 (use https where possible)  | 
				 (replace /etc/init.d with rc-service)  | 
				||
| Line 9: | Line 9: | ||
== Configuring postgresql ==  | == Configuring postgresql ==  | ||
{{Cmd|  | {{Cmd|rc-service postgresql setup}}  | ||
Starting http service and adding to boot.  | Starting http service and adding to boot.  | ||
{{Cmd|  | {{Cmd|rc-service postgresql start && rc-update add postgresql default}}  | ||
== Installing phpPgAdmin ==  | == Installing phpPgAdmin ==  | ||
Latest revision as of 09:43, 17 November 2023
phpPgAdmin is a web-based administration tool for PostgreSQL.
Install lighttpd, PHP, and postgresql
Basic Installation
For installing the additional packages first activate community packages and update the package index
Install the required packages:
# apk add lighttpd php fcgi php-cgi
Configure Lighttpd
Edit lighttpd.conf (/etc/lighttpd/lighttpd.conf) and uncomment the line:
Contents of /etc/lighttpd/lighttpd.conf
Start lighttpd service and add it to default runlevel
# rc-service lighttpd start # rc-update add lighttpd default
Install extra packages
apk add postgresql postgresql-client php-pgsql
Configuring postgresql
rc-service postgresql setup
Starting http service and adding to boot.
rc-service 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 https://downloads.sourceforge.net/phppgadmin/phpPgAdmin-5.0.4.tar.gz
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/config.inc.php-dist /usr/share/webapps/phppgadmin/conf/config.inc.php
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.