Enterprise PostgreSQL installation, repository configuration, Linux administration and PostgreSQL server deployment for Red Hat Enterprise Linux and Ubuntu systems.
Navigate to:
https://www.postgresql.org/download/
Select operating system as Linux.
Select appropriate Linux distribution (Example: Red Hat).
Select PostgreSQL YUM Repository.
Select latest PostgreSQL version.
Select appropriate platform.
Copy and execute the installation commands on your Linux server.
# Install PostgreSQL repository sudo dnf install -y \ https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm # Disable built-in PostgreSQL module sudo dnf -qy module disable postgresql # Install PostgreSQL Server sudo dnf install -y postgresql17-server # Install PostgreSQL Contrib Package sudo dnf install -y postgresql17-contrib # Initialize Database sudo /usr/pgsql-17/bin/postgresql-17-setup initdb # Enable PostgreSQL Service sudo systemctl enable postgresql-17 # Start PostgreSQL Service sudo systemctl start postgresql-17 # Verify Service Status sudo systemctl status postgresql-17
adduser username passwd username
usermod -aG wheel username
cat /etc/group | grep wheel
Navigate to:
https://www.postgresql.org/download/
Select Linux operating system.
Select Ubuntu distribution.
Ubuntu includes PostgreSQL by default. Install PostgreSQL using apt.
sudo apt install postgresql postgresql-contrib
Use PostgreSQL official repository for latest PostgreSQL versions.
sudo apt install -y postgresql-common sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
# Install required packages sudo apt install curl ca-certificates # Create directory sudo install -d /usr/share/postgresql-common/pgdg # Download repository key sudo curl -o \ /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc \ --fail \ https://www.postgresql.org/media/keys/ACCC4CF8.asc # Configure repository sudo sh -c \ 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] \ https://apt.postgresql.org/pub/repos/apt \ $(lsb_release -cs)-pgdg main" \ > /etc/apt/sources.list.d/pgdg.list' # Update package list sudo apt update # Install PostgreSQL sudo apt -y install postgresql
PostgreSQL administration, replication architecture, high availability, performance tuning and enterprise DBA consulting.