How to install and setup PostgreSQL on RHEL 8

Originally published at: https://www.cyberciti.biz/faq/install-and-setup-postgresql-on-rhel-8/

How do I install PostgreSQL relational database management on RHEL 8 using the command line? How do I install and setup PostgreSQL on RHEL 8 server using application streams?