top of page
  • Piyush Ranjan

PostgreSQL 15 on Oracle Linux 7.9

PostgreSQL is a powerful, open-source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance and is supported by a number of different programming languages. It is often used as a backend for web applications and has a strong reputation for reliability, data integrity, and correctness.


To install Postgresql, visit the official PostgreSQL website. Select your operating system


Select your Linux distribution as REDHAT


Select the latest version as 15, and Select platform as OEL 7


You will the steps to Install the Postgresql

# Install the repository RPM:
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

# Install PostgreSQL:
sudo yum install -y postgresql15-server

# Optionally initialize the database and enable automatic start:
sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
sudo systemctl enable postgresql-15
sudo systemctl start postgresql-15

Copy the first to install the repository RPM and run it in the terminal

yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

Now Copy the second step to Install PostgreSQL

yum install -y postgresql15-server

Now, install using YUM

yum install -y https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libzstd-1.5.2-1.el7.x86_64.rpm

Now, run the second step

yum install -y postgresql15-server

Now, after installation, we will initialize the database and enable automatic start:

/usr/pgsql-15/bin/postgresql-15-setup initdb
systemctl enable postgresql-15
systemctl start postgresql-15

and after that, we'll check for the process using

ps -ef | grep postgres

As we can see that our Postgres service is running using Postgres user. Let's login to the Postgres user and login to the psql

su - postgres
psql

let's check for the database

\l

We can see that 2 templates and 1 sample Postgres database in the list. Thank you ..!

268 views

Recent Posts

See All
bottom of page