Linux安装postgresql
直接去postgresql官网有具体的安装教程,如以下一般
1.Select version: 13 2.Select platform: Red Hat Enterprise, CentOS or Oracle version 8 3.Select architecture: x86_64
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