Postgres datbase installation on oracle linux 9.6
Step by step
Installing PostgreSQL 17 on Oracle Linux 9.6
In this video, we will learn how to install PostgreSQL 17 on Oracle Linux 9.6 step by step with practical commands.
Download Links
[Oracle Software Delivery Cloud](https://edelivery.oracle.com?utm_sour...)
[VirtualBox Official Website](https://www.virtualbox.org?utm_source...)
[PostgreSQL Official Website](https://www.postgresql.org?utm_source...)
---
Installing PostgreSQL on Oracle Linux 9.6
Repository Location
```bash
cd /etc/yum.repos.d/
```
Install PostgreSQL Repository
```bash
dnf install -y https://download.postgresql.org/pub/r...
```
---
Disable Inbuilt PostgreSQL Module
(Some operating systems come with bundled PostgreSQL packages)
```bash
dnf -qy module disable postgresql
```
---
Install PostgreSQL 17 Packages
```bash
dnf install -y postgresql17-server postgresql17-contrib
```
---
Initialize PostgreSQL Database
Method 1
```bash
/usr/pgsql-17/bin/postgresql-17-setup initdb
```
Method 2
```bash
su - postgres
/usr/pgsql-17/bin/postgresql-17-setup initdb
```
---
Start and Enable PostgreSQL Service
```bash
systemctl start --now postgresql-17
systemctl enable --now postgresql-17
```
Enable command helps PostgreSQL start automatically after server reboot.
---
Configure PostgreSQL Environment Variables
```bash
su - postgres
pwd
vi /var/lib/pgsql/.bash_profile
```
Add below line:
```bash
export PATH=$PATH:/usr/pgsql-17/bin
```
Reload Profile:
. .bash_profile
Verify PATH:
echo $PATH
PostgreSQL Service Commands
which pg_ctl
pg_ctl stop
pg_ctl start
pg_ctl restart
PostgreSQL 17 Installation
PostgreSQL Repository Configuration
PostgreSQL Service Management
PostgreSQL PATH Configuration
pg_ctl Commands
Oracle Linux 9.6 Administration
PostgreSQL DBA Basics
#postgresql #postgres17 #oraclelinux #linux #database #postgresdba #postgresqltutorial #oraclelinux9 #pg_ctl #postgresinstallation