PhpPgAdmin: Difference between revisions
m (update to use Setting Up Lighttpd With FastCGI template) |
m (minor layout changes) |
||
Line 13: | Line 13: | ||
== Install lighttpd, PHP and postgresql == | == Install lighttpd, PHP and postgresql == | ||
{{:Setting Up Lighttpd With FastCGI}} | {{:Setting Up Lighttpd With FastCGI}} | ||
Install extra packages | Install extra packages | ||
{{Cmd|apk add postgresql postgresql-client php-pgsql}} | |||
== Configuring postgresql == | == Configuring postgresql == | ||
{{Cmd|/etc/init.d/postgresql setup}} | |||
'''Starting http service and adding to boot''' | '''Starting http service and adding to boot''' | ||
{{Cmd|/etc/init.d/postgresql start && rc-update add postgresql default}} | |||
== Installing phpPgAdmin == | == Installing phpPgAdmin == | ||
Line 30: | Line 31: | ||
Make webapps folder | Make webapps folder | ||
{{Cmd|mkdir /usr/share/webapps/ -p}} | |||
Download | Download | ||
{{Cmd|cd /usr/share/webapps/ | |||
wget http://downloads.sourceforge.net/phppgadmin/phpPgAdmin-4.2.3.tar.gz}} | |||
Unpack and delete tar file | Unpack and delete tar file | ||
{{Cmd|tar zxvf phpPgAdmin-4.2.3.tar.gz | |||
rm phpPgAdmin-4.2.3.tar.gz}} | |||
Change Folder Name | Change Folder Name | ||
{{Cmd|mv phpPgAdmin-4.2.3 phppgadmin}} | |||
Change Config File Name | Change Config File Name | ||
{{Cmd|cp /usr/share/webapps/phppgadmin/conf/config.inc.php-dist /usr/share/webapps/phppgadmin/conf/config.inc.php}} | |||
Change Folder Persmissions | Change Folder Persmissions | ||
{{Cmd|chmod -R 777 /usr/share/webapps/}} | |||
Make Symlink to the phpPgAdmin folder | Make Symlink to the phpPgAdmin folder | ||
{{Cmd|ln -s /usr/share/webapps/phppgadmin/ /var/www/localhost/htdocs/phppgadmin}} | |||
== Log on your phpPgAdmin == | == Log on your phpPgAdmin == | ||
Line 65: | Line 66: | ||
'''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. | '''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 | e.g: if you set the port to 8080, then browse to: http://WEBSERVER_IP_ADDRESS:8080/phppgadmin | ||
Revision as of 06:13, 23 June 2011
What is phpPgAdmin?
phpPgAdmin is a web-based administration tool for PostgreSQL. It is perfect for PostgreSQL DBAs, newbies and hosting services.
Set up phpPgAdmin on Alpine Linux
This document will be a very quick c/p guide to setup phpPgAdmin on Alpine linux. What we will setup is the following:
- Lighttpd with PHP
- postgresql
- phpPgAdmin
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
Install phpPgAdmin
Make webapps folder
mkdir /usr/share/webapps/ -p
Download
cd /usr/share/webapps/ wget http://downloads.sourceforge.net/phppgadmin/phpPgAdmin-4.2.3.tar.gz
Unpack and delete tar file
tar zxvf phpPgAdmin-4.2.3.tar.gz rm phpPgAdmin-4.2.3.tar.gz
Change Folder Name
mv phpPgAdmin-4.2.3 phppgadmin
Change Config File Name
cp /usr/share/webapps/phppgadmin/conf/config.inc.php-dist /usr/share/webapps/phppgadmin/conf/config.inc.php
Change Folder Persmissions
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. And enjoy this nice and useful tool.
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