1.安装PostgreSQL13
dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql
dnf install -y postgresql13-server
/usr/pgsql-13/bin/postgresql-13-setup initdb
安装后bin目录:/usr/pgsql-13/bin/
data目录:/var/lib/pgsql/13/data/
2.修改postgresql.conf
listen_addresses = ‘*’
port = 5432
3.启动服务
systemctl enable postgresql-13
systemctl start postgresql-13
4.psql测试
[root@localhost data]# psql -U postgres postgres
psql (13.2) Type “help” for help.
postgres=#
06-09
630
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-25
299
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-27
542
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)