Steps to Install and use PostgreSQL Version 10.2 on RHEL 7.5
Steps to install Postgresql in RHEL-7.5
Download and install PostgreSQL.
```
$ sudo yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm
$ sudo yum-config-manager --disable pgdg95
```Check the postgresql packages
```
$ sudo yum update
$ sudo yum list postgresql*
```Installation command
```
$ sudo yum install postgresql10 postgresql10-server
$ sudo /usr/pgsql-10/bin/postgresql-10-setup initdb
$ sudo systemctl enable postgresql-10
```Postgresql service stop/start/restart command
Steps to change the default port
Open the file and modify the below changes
Use below command to open the port 9001 from RHEL 7.5 VM
To increase the buffer size and number of postgreSql connection same fine modify the below changes also
Start the service
To change the default password
Login to postgrsql
Restart the service:
Open the file
TYPE
DATABASE
USER
ADDRESS
METHOD
TYPE
DATABASE
USER
ADDRESS
METHOD
Last updated
Was this helpful?