安装postgres

安装postgresql

yum安装

官网参考:https://www.postgresql.org/download/linux/redhat/

# 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命令即可使其生效而不用重启服务)

posted @ 2024-04-17 14:18  武胜造纸农  阅读(14)  评论(0)    收藏  举报