From 2062671e47b7388a3cc51dd17bb6594d0f525f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=AD=9F=E5=BD=A4?= <3436235697@qq.com> Date: Sun, 5 Jan 2025 21:49:30 +0800 Subject: [PATCH] =?UTF-8?q?20241230=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20241230-postgresql.md" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "\345\220\264\345\255\237\345\275\244/20241230-postgresql.md" diff --git "a/\345\220\264\345\255\237\345\275\244/20241230-postgresql.md" "b/\345\220\264\345\255\237\345\275\244/20241230-postgresql.md" new file mode 100644 index 0000000..7592ac0 --- /dev/null +++ "b/\345\220\264\345\255\237\345\275\244/20241230-postgresql.md" @@ -0,0 +1,18 @@ +### 在Linux安装新数据库 +1. 登录linux +2. 更新一下包 apt update +3. 更新一下系统 apt upgrade -y +4. apt install -y postgresql-common +5. /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh +6. 修改密码 + * 登录超级管理员 `postgres` + * ALTER USER postgres WITH PASSWORD 'new_password'; +7. 修改配置文件 + * pg_hba.conf + ``` + 找到文件末尾添加 host all all 0.0.0.0/0 mds + ``` + * postgresql.conf + ``` + 编辑文件,找到listen_address参数,将其设置为‘*’,用以监听所有IP地址的连接请求 + ``` \ No newline at end of file -- Gitee