# PostgreSQL Install

# Mac OS 安装

两种安转方式:

  • 通过EDB安装
  • 通过Homebrew安装

# EDB

进入下载页postgresql下载页 (opens new window),选择macOS平台,然后选择Download the installer

postgresql-001

注意看一下对应macOS的版本兼容性

postgresql-002

选择对应的Mac OSX的版本,点击下载按钮,得到postgresql-14.2-2-osx.dmg的安装包,双击安装

下一步, postgresql-003

选择数据库安装目录 postgresql-004

选择需要安装的组件 postgresql-005

选择数据存储目录 postgresql-006

输入密码 postgresql-007

确认端口号 postgresql-008

选择Locale postgresql-009

预览安装选项 postgresql-010

确认安装 postgresql-011

正在安装 postgresql-012

确认结束 postgresql-013

安装好PostgreSQL后, 有了一个默认的superuser叫postgres, 密码为前面我们设置的密码

打开命令行工具, 输入以下命令查看是否正常运行

ps aux | grep postgres

postgresql-015

# Linux 安装

陕ICP备20004732号-3