安装postgresql
yum安装
# Install the repository RPM:
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# Install PostgreSQL:
sudo yum install -y postgresql15-server
# Optionally initialize the database and enable automatic start:
sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
sudo systemctl enable postgresql-15
sudo systemctl start postgresql-15
配置文件:/var/lib/pgsql/15/data/postgresql.conf
客户端认证配置文件:/var/lib/pgsql/15/data/pg_hba.conf
(只需要执行pg_ctl reload命令即可使其生效而不用重启服务)