PostgreSql: 安装与链接

环境介绍

使用宝塔面板,在阿里云中安装PostgreSql,并使用DataGrip在本地进行链接

postgresql 配置

安装postgresql

在宝塔中安装postgresql 管理器
image
在此处点击安装postgresql , 我安装的是14.2。各位可以自行选择
image
之后等待安装完成即可

修改配置文件

修改postgresql.conf

image

修改pg_hba.conf

image

重启

image

阿里云服务器

添加安全组

image

让端口通过防火墙

firewall-cmd --zone=public --add-port=5432/tcp --permanent  // 通过防火墙
firewall-cmd --reload  // 重启防火墙

DataGrip

使用DataGrip,选择postgresql进行链接。需要注意的点如下:

  • 默认数据库: postgres
  • port: 5432
  • 默认用户名: postgres
  • 默认密码: postgres

参考链接

https://blog.csdn.net/u011677255/article/details/105487288
https://www.jianshu.com/p/f246dc45e6dc

posted @ 2023-06-15 15:46  胸怀丶若谷  阅读(436)  评论(0编辑  收藏  举报