Mac 安装 PostgreSQL简易教程
下载安装包
![](https://file.jishuzhan.net/article/1796548693793443841/94c46cff1eaa95c686824a4ebb695621.webp)
我下载的文件:Postgres-2.7.3-16.dmg
双击 dmg 文件安装
![](https://file.jishuzhan.net/article/1796548693793443841/7a80bbd2615ac7ae27df753dc7a3eeb5.webp)
拖拽图标到右边的文件,然后到应用程序中找到 Postgres.app 双击打开。
然后点击 Initialize 按钮
![](https://file.jishuzhan.net/article/1796548693793443841/5a34f5f9147ab43ab54516095dd2b1bd.webp)
![](https://file.jishuzhan.net/article/1796548693793443841/99c41d734da7d010879dcd47aeae6ee8.webp)
配置$PATH 到命令下工具(这边可选)
bash
sudo mkdir -p /etc/paths.d &&
echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp
![](https://file.jishuzhan.net/article/1796548693793443841/99c41d734da7d010879dcd47aeae6ee8.webp)
双击一个数据库打开终端, 然后可以进行一系列命令操作。