建議用 Postgres.app,這是一套開源軟體,內有 PostgreSQL / PostGIS / plv8
- 下載回來 .dmg檔案 點擊兩下開啟安裝檔,把大象移到左側資料夾中
![安裝檔畫面](https://ithelp.ithome.com.tw/upload/images/20190919/20105865zRkKTvDtSm.png)
- 點開資料夾,mac的應用程式集會看到大象圖案
![應用程式畫面](https://ithelp.ithome.com.tw/upload/images/20190919/20105865ezTcE7Cr9Z.png)
- 點兩下開啟程式後點選 Initialize
![Postgres.app畫面](https://ithelp.ithome.com.tw/upload/images/20190919/20105865i710WkUnwK.png)
- 成功初始化會顯示如下圖
![成功初始化畫面](https://ithelp.ithome.com.tw/upload/images/20190919/20105865LDgOjsj1kv.png)
- 表示電腦已安裝好PostgreSQL,螢幕右上角也會出現大象圖案
![大象圖示](https://ithelp.ithome.com.tw/upload/images/20190919/2010586501zWEC38sP.png)
安裝 pgAdmin
pgAdmin 官網:https://www.pgadmin.org/download/
- 下載畫面選擇 macOS -> 最新版 -> .dmg檔案
![pgAdmin下載畫面](https://ithelp.ithome.com.tw/upload/images/20190919/20105865bFSoRDSHdB.png)
![pgAdmin下載畫面](https://ithelp.ithome.com.tw/upload/images/20190919/20105865EpgdPlp7j2.png)
![pgAdmin下載畫面](https://ithelp.ithome.com.tw/upload/images/20190919/20105865jxcEWnkEw5.png)
- 點兩下打開下載的 .dmg檔案 (右側視窗),左側為應用程式視窗,把大象圖示拖曳至左側
![pgAdmin](https://ithelp.ithome.com.tw/upload/images/20190919/20105865YVLqJ4HZVH.png)
等待複製程序
![pgAdmin](https://ithelp.ithome.com.tw/upload/images/20190919/20105865u66GUpxDk9.png)
![pgAdmin](https://ithelp.ithome.com.tw/upload/images/20190919/20105865GT4V3Phkin.png)
- 開啟 pgAdmin 4,他是一個 Web 介面(之前剛進公司的時候還是應用程式的樣子,現在直接用瀏覽器打開 酷~)
載入中圖示
![pgAdmin 4 介面](https://ithelp.ithome.com.tw/upload/images/20190919/20105865ILhHfERait.png)
pgAdmin 4 畫面
![pgAdmin 4 介面](https://ithelp.ithome.com.tw/upload/images/20190919/20105865WyPaTok9Wl.png)
- 如上圖所示先設定一組開啟pgAdmin 4用的密碼 (可能因為我之前裝過,設定語言是簡體中文,因此一打開來是簡體中文...)
成功安裝 PostgreSQL、pgAdmin 4
提醒 使用 pgAdmin4 要先啟動 PostgreSQL
此篇文章同步發到個人部落格