网站首页 > 教程文章 正文
一、安装
# 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 postgresql14-server
# Optionally initialize the database and enable automatic start:
sudo /usr/pgsql-14/bin/postgresql-14-setup initdb
sudo systemctl enable postgresql-14
sudo systemctl start postgresql-14
二、配置
一)安装目录:/var/lib/pgsql/14/data/
1)vim postgresql.conf 修改开放端口
listen_addresses = '*'
2)vim pg_hba.conf 修改对外开放 在最后一行加入此描述
host all all 0.0.0.0/0 trust
二)云主机修改安全组 增加5432端口出入组放开
三、远程连接
通过datagrip远程连接即可,连接之前配置好相应的数据库用户名、密码以及创建好数据库等
postgres=# create user "abcd" with password '123456';
postgres=#create database "abcd" with owner = "abcd";
猜你喜欢
- 2025-01-10 AI编程之手把手教你在CentOS安装Postgresql的Vector向量数据库
- 2025-01-10 PostgreSQL技术内幕13:PostgreSQL通讯协议
- 2025-01-10 等保2.0测评:PostgreSQL数据库
- 2025-01-10 PostgreSQL技术内幕10:PostgreSQL事务原理解析-日志模块介绍
- 2025-01-10 基于patroni+etcd打造可自动故障转移的PostgreSQL集群
- 2025-01-10 新手如何快速搭建多套PostgreSQL集群
- 2025-01-10 PostgreSQL是不是你的下一个JSON数据库?
- 2025-01-10 轻松入门PostgreSQL:安装和设置数据库的完整指南!
- 2025-01-10 PostgreSQL、MySQL 数据库被入侵究竟有多么普遍?有人做了一项实验
- 2025-01-10 一日一技:Python | PostgreSQL中的数据库管理
- 最近发表
-
- 一个可以用来练手的C++开源编译器!
- Linux开发工具使用指南(linux软件开发工具)
- Linux下Makefile文件的模式规则和自动化变量
- 程序员的副业秘籍!一款可以快速搭建各类系统的后台管理系统
- postgresql自定义函数实现,通过contrib模块进行扩展
- Linux GCC编译及Makefile使用(gcc makefile编写)
- wordpress独立站上线两周没收录?原来是robots.txt搞的鬼…
- make sure用法解析(make sure sth)
- 每天一个 Python 库:Django全能Web框架,一站式后台开发
- Makefile实践(makefile经典教程)
- 标签列表
-
- location.href (44)
- document.ready (36)
- git checkout -b (34)
- 跃点数 (35)
- 阿里云镜像地址 (33)
- qt qmessagebox (36)
- mybatis plus page (35)
- vue @scroll (38)
- 堆栈区别 (33)
- 什么是容器 (33)
- sha1 md5 (33)
- navicat导出数据 (34)
- 阿里云acp考试 (33)
- 阿里云 nacos (34)
- redhat官网下载镜像 (36)
- srs服务器 (33)
- pico开发者 (33)
- https的端口号 (34)
- vscode更改主题 (35)
- 阿里云资源池 (34)
- os.path.join (33)
- redis aof rdb 区别 (33)
- 302跳转 (33)
- http method (35)
- js array splice (33)