Centos8安装PostgreSQL

一、前言

官网地址:https://www.postgresql.org/download/linux/redhat/

二、安装

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

# Disable the built-in PostgreSQL module:
sudo dnf -qy module disable postgresql

# Install PostgreSQL:
sudo dnf install -y postgresql13-server

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

过程中如果出现错误,请执行:sudo dnf install wget

上一篇:OS:redhat8更换网络源


下一篇:linux命令之dnf命令