参考:https://blog.csdn.net/weixin_46732884/article/details/124050982
参考:https://www.fengnayun.com/news/content/293898.html
1、添加PostgreSQL Yum存储库
yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
2、安装PostgreSQL Server和客户端软件包
yum -y install postgresql11-server postgresql11
3、初始化数据库并启用自动启动
/usr/pgsql-11/bin/postgresql-11-setup initdb
4、启用远程访问PostgreSQL
vim /var/lib/pgsql/11/data/postgresql.conf # 修改 listen_addresses = '*' vim /var/lib/pgsql/11/data/pg_hba.conf # 修改 host all all 127.0.0.1/32 md5 # 添加 host all all 0.0.0.0/0 trust
启动
systemctl start postgresql-11
5、设置PostgreSQL管理员用户的密码(一定要按照这种格式配置用户名和密码)
su - postgres psql -c "alter user postgres with password 'sykj@2023'"
标签:11,pgsql,postgresql,Centos7,yum,https,PostgreSQL From: https://www.cnblogs.com/lfxx/p/17616078.html