您想了解如何在 Windows 上安装 PostgreSQL 吗? 本教程将向您展示如何在运行 Windows 的计算机上安装 PostgreSQL 服务。

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7
• PostgreSQL 13

硬件列表:

以下部分介绍用于创建本教程的设备列表。

上面列出的每一件硬件都可以在亚马逊网站上找到。

与 Windows 相关的教程:

在此页上,我们提供对与 Windows 相关的教程列表的快速访问。

教程 PostgreSQL - 在 Windows 上安装

访问 POSTGRESQL 网站并下载 POSTGRESQL 安装包。

PostgreSQL Installation Windows

在我们的示例中,PostgreSQL 版本 13 将安装在运行 Windows 2016 的计算机上。

双击包以启动 PostgreSQL 软件安装。

PostgreSQL Windows

选择安装目录,然后单击"下一步"按钮。

PostgreSQL Windows Installation

选择所需的 PostgreSQL 组件。

PostgreSQL Windows Components

选择数据目录并单击"下一步"按钮。

PostgreSQL Windows Data directory

输入 PostgreSQL 服务管理员的密码。

PostgreSQL Windows password

为 PostgreSQL 服务设置所需的 TCP 端口。

在我们的示例中,我们保留了默认的 TCP 端口。

PostgreSQL Port Windows

单击"下一步"按钮。

PostgreSQL Installation Locale

验证摘要并启动 PostgreSQL 安装。

PostgreSQL Installation Windows Summary

取消选中该框并单击"完成"按钮。

Windows PostgreSQL installation

在 Windows 服务器上,单击"开始"菜单并选择 SQL SHELL 选项。

输入 POSTGRESQL 管理员密码。

PostgreSQL command-line Windows

该安装还提供一个 Web 界面来管理名为 PGADMIN4 的 PostgreSQL。

Windows Postgres PGADMIN

恭喜您,您已经安装了 Windows 上的 PostgreSQL 服务。