![]() On any other computer which is in the same network (defined by the /XX value set previously), you can now test if the remote connection to your Postgres server is working using the psql shell (if your client computer is CentOS, you need to install it using yum install postgresql) by logging in on the server remotely and printing out some test data.When you have finished, save the file in the usual way before restarting the database server by typing the following command:.Add the following lines to the end of the file:.When you have finished, simply save and close the file in the usual way before opening the main Postgres configuration file by typing:.For example, if the IP address of your server was 192.168.1.12 then the network address would be 192.168.1.0/24): Scroll down to the end of the file and append the following line, to make these lines read as follows (substitute the /XX value with a network address you want to grant access to.Now open the host-based authentication configuration file in your favorite text editor by typing:.To begin, log in as root and first open the firewall to allow any incoming PostgreSQL connections to the server:įirewall-cmd -permanent -add-service=postgresql firewall-cmd -reload.Here we will make changes to it to manage remote access to our Postgres server. In the previous process, we have already modified the host-based authentication configuration pg_hba.conf file using sed to manage our Postgres’s client authentication from peer to md5. It is expected that PostgreSQL is already installed and running. To complete this process, you will require a working installation of the CentOS 7 operating system with root privileges and a text editor of your choice. ![]() Postgres employs a method called host-based authentication and it is the purpose of this process to introduce you to its concepts in order to provide the access rights you need to run a safe and secure database server. ![]() In this process, we will learn how to configure remote access to a Postgres server which is disabled by default.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |