pgpass file that contains the password, which will make the postgresql service start without any issues. Use this only for testing purpose.Īnother thing to note is that when you set it to “md5”, when you are starting the PostgreSQL, you may have to give a password, or it will fail to start. If you are running into issues and getting “Login failed” error message from the GUI, you can set “trust” as value for the last column in the pg_hba.conf file, which will run in “trust” mode, which will not ask for password when you login from the phpPgAdmin GUI. In our case, we are using md5, as we want to login through the phpPgAdmin web console using a valid username and password. Possible options for the last column in the pg_hba.conf files are: trust, md5, password, reject, gss, sspi, krb5, ident, pam, ldap, cert. I added the following line to pg_hba.conf file, as I’ll be calling the phpPgAdmin web URL using the internal ip-address of this server, which is 192.168.101.2. You can either change the “ident” option to “md5” for all of the above lines, or just specify “md5” option only for your server’s ip-address that you are using to call the phpPgAdmin web URL. Modify PostgreSQL pg_hba.conf Fileīy default, you’ll see something like the following in your pg_hba.conf file: Change the value from localhost to * for listen_address parameter in the nf file as shown below.Īfter the above change, restart your PostgreSQL database. If you are running phpPgAdmin (Apache/PHP) on a server that is different than the server that is running PostgreSQL server, then you should modify the nf file on the PostgreSQL server, and change the listen_address.īy default, this will be set to localhost. Modify PostgreSQL nf Fileįor the phpPgAdmin to work properly, you should also make few changes to the nf file. You need to recompile PHP using the –with-pgsql configure option. If you don’t have pgsql, you’ll get this error message when you try to access phpPgAdmin from web: Your PHP installation does not support PostgreSQL. If you have installed PHP using yum, then you should install the php-pgsql package as shown below.Īfter the above, make sure you restart the apache using one of the following method depending on your environment. If you have installed PHP from source, you should recompile PHP using –with-pgsql option. If you don’t see the above, install the appropriate pgsql support for your PHP. When you go to your you should see pgsql option as shown below. Mv phpPgAdmin-5.1 /var/www/html/phpPgAdmin Move the phpPgAdmin-version-number directory to your Apache’s DocumentRoot directory as phpPgAdmin (i.e without the version-number) as shown below. Move phpPgAdmin to Apache DocumentRootĪfter downloading the file, untar it as shown below. The latest phpPgAdmin supports most versions of PostgreSQL DB including 8.4.x and all 9.x.y (9.1.21, 9.2.16, etc, ). Or, use wget and download it directly on your server as shown below. To verify whether your system already has PHP installed and configured for web access, place the following file in your document root and access it using the ip-address of your server.Īccess the above test.php using the following URL of your server to verify PHP installation.ĭownload the phpPgAdmin from here, and move it to your server. In the same way, you can install PHP from yum, or download and install PHP from source code. You can install Apache from yum, or download and install Apache from source code. Install PHP and Apacheįor phpPgAdmin tool, you need to have Apache and PHP already running on your environment. Note: If you are using MySQL database on your environment, you can install phpMyAdmin to manage your MySQL database from a web console: 5 Steps to Install phpMyAdmin on Linux 1. This tutorial explains how to install and configure phpPgAdmin tool to manage PostgreSQL from a web interface. You don’t have to worry about remembering PostgreSQL DBA commands or syntax. Using phpPgAdmin, you can pretty much do all PostgreSQL DBA activities from a web-based console. Also, some of the DBA concepts in PostgreSQL are slightly different than MySQL. If you are MySQL DBA, you might notice that there is a slight difference in the syntax for few of the commands in PostgreSQL. If you have PostgreSQL running in your environment, managing it from command-line might be bit difficult as you have to remember all the db commands and syntax.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |