phpPgAdmin on CentOS & RHEL
- How to Install PostgreSQL 9.5 on CentOS/RHEL 7/6/5 and Fedora 23/22
- How to install phpmyadmin on centos 7
Step 1: Add PostgreSQL Repository
Install postgres repository in your system, Download repository rpm using one of below urls.
CentOS/RHEL 5, 32-Bit: # wget http://yum.postgresql.org/9.1/redhat/rhel-5-i386/pgdg-centos91-9.1-4.noarch.rpm CentOS/RHEL 6, 32-Bit: # wget http://yum.postgresql.org/9.1/redhat/rhel-6-i386/pgdg-centos91-9.1-4.noarch.rpm CentOS/RHEL 5, 64-Bit: # wget http://yum.postgresql.org/9.1/redhat/rhel-5.0-x86_64//pgdg-centos91-9.1-4.noarch.rpm CentOS/RHEL 6, 64-Bit: # wget http://yum.postgresql.org/9.1/redhat/rhel-6.3-x86_64/pgdg-centos91-9.1-4.noarch.rpm
Step 2: Install phpPgAdmin using Yum
Install phpPgAdmin package using yum command line tool.
yum install phpPgAdmin httpd
Step 3: Configure phpPgAdmin to Access Remotly.
Note: phpPgAdmin is case sensitive. Use upper and lower cases properly as shown in the above command.
By default, you can access phppgadmin using http://localhost/phpPgAdmin from your local system only. To access remote systems, do the following.
Edit file /etc/httpd/conf.d/phpPgAdmin.conf:
vi /etc/httpd/conf.d/phpPgAdmin.conf
[...]
Alias /phpPgAdmin /usr/share/phpPgAdmin
<Location /phpPgAdmin>
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
#Require host example.com
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
# Allow from .example.com
</IfModule>
</Location>
Step 4: Restart Apache Service
Restart Apache service to reload new settings.
# service httpd restart
Step 5 : Configure phpPgAdmin
Edit file /etc/phpPgAdmin/config.inc.php, and do the following changes. Most of these options are self-explanatory. Read them carefully to know why do you change these values.
vi /etc/phpPgAdmin/config.inc.php
Find the following line:
$conf['servers'][0]['host'] = '';
Change it as shown below:
$conf['servers'][0]['host'] = 'localhost';
And find the line:
$conf['extra_login_security'] = true;
Change the value to false:
$conf['extra_login_security'] = false;
Find the line:
$conf['owned_only'] = false;
Set the value as true.ru
$conf['owned_only'] = true;
Save and close the file. Restart postgresql service and Apache services.
On CentOS 6.x systems:
service postgresql-9.5 restart
service httpd restart
On CentOS 7 systems:
systemctl restart postgresql-9.5
systemctl restart httpd
Now open your browser and navigate to http://ip-address/phpPgAdmin.
0 comments:
Post a Comment