PhpPgAdmin: Difference between revisions
Dubiousjim (talk | contribs) (Category:SQL) |
|||
Line 24: | Line 24: | ||
{{Cmd|cd /usr/share/webapps/ | {{Cmd|cd /usr/share/webapps/ | ||
wget http://downloads.sourceforge.net/phppgadmin/phpPgAdmin-5.0. | wget http://downloads.sourceforge.net/phppgadmin/phpPgAdmin-5.0.4.tar.gz}} | ||
Unpack and delete tar file | Unpack and delete tar file | ||
{{Cmd|tar zxvf phpPgAdmin-5.0.2.tar.gz | {{Cmd|tar zxvf phpPgAdmin-5.0.2.tar.gz | ||
rm phpPgAdmin-5.0. | rm phpPgAdmin-5.0.4.tar.gz}} | ||
Change folder name | Change folder name | ||
{{Cmd|mv phpPgAdmin-5.0. | {{Cmd|mv phpPgAdmin-5.0.4 phppgadmin}} | ||
Copy the sample config file name | Copy the sample config file name |
Revision as of 14:11, 29 March 2012
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 php82 fcgi php82-cgi
Configure Lighttpd
Edit lighttpd.conf (/etc/lighttpd/lighttpd.conf) and uncomment the line:
Contents of /etc/lighttpd/lighttpd.conf
Edit mod_fastcgi.conf (/etc/lighttpd/mod_fastcgi.conf), find and change /usr/bin/php-cgi to /usr/bin/php-cgi82.
Contents of /etc/lighttpd/mod_fastcgi.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
/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.