Howto Install phpPgAdmin on DirectAdmin

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

First, make sure you have install PostgreSQL on your DirectAdmin, or you can install it using this howto.

Lets start…

1. Download the soucre (you can choose another mirror from here)

# cd /var/www/html
# wget http://superb-west.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-4.0.1.tar.gz
# tar -xzf phpPgAdmin-4.0.1.tar.gz
# rm -f phpPgAdmin-4.0.1.tar.gz

2. You may like to have a shorter directory name

# mv phpPgAdmin-4.0.1 phpPgAdmin

3. Assign proper permission

# chown -R root:root phpPgAdmin

4. Edit file config.inc.php to fit your needs

# nano -w ./phpPgAdmin/conf/config.inc.php

Set $conf['servers'][0]['host'] to “localhost” if PostgreSQL is installed on local machine

You can restore the config file at anytime by typing:

# cd ./phpPgAdmin/conf
# cp config.inc.php-dist config.inc.php

5. Edit httpd.conf

# nano -w /etc/httpd/conf/httpd.conf

After:
Alias /phpmyadmin /var/www/html/phpMyAdmin/
Add:
Alias /phpPgAdmin /var/www/html/phpPgAdmin/
Alias /phppgadmin /var/www/html/phpPgAdmin/

6. Edit DA skin to display a phpPgAdmin link

# nano -w /usr/local/directadmin/data/skins/enhanced/user/show_domain.html

After:
|*if USERDATABASEMAX!="0"|
<a href="http://|domain|/phpmyadmin" target="_blank_">|LANG_PHPMYADMIN|</a><br>
|*endif|
Add:
<a href="http://|domain|/phppgadmin" target="_blank_">phpPgAdmin</a><br>

7. Restart Apache

# service httpd restart

You can now access phpPgAdmin with:
http://www.hostname.com/phppgadmin
or
http://www.hostname.com/phpPgAdmin

Congratulations, you did it :D

Note:
If you want automatic install or upgrade, you can use this method:

# wget http://www.yourserverguide.com/wp-content/uploads/phpPgAdmin.sh
# chmod 700 phpPgAdmin.sh
# ./phpPgAdmin.sh

 |  Print This Post Print This Post

Blogsphere: TechnoratiFeedsterBloglines
Bookmark: Del.icio.usSpurlFurlSimpyBlinkDigg
RSS feed for comments on this post
 |  TrackBack URI for this post



Related Post:


Leave a Reply