在 Windows 10 安裝 PostgreSQL

開啟網頁 https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

圖 28

點擊 Windows x86-64 下的 14.1 版本,如下圖所示:

圖 29

點擊後應該會看到下圖,此時已經在下載安裝檔:

圖 30

若尚未開始下載安裝檔,就點擊 Click here if your download does not start automatically. 橘色按鈕。

下載完成後打開安裝檔:

圖 31

點擊 Next

圖 33

點擊 Next

圖 34

點擊 Next

圖 35

點擊 Next

圖 37

這裡要設定超級使用者 postgres 的密碼,輸入密碼後,點擊 Next

圖 38

點擊 Next

圖 40

點擊 Next

圖 41

點擊 Next

圖 42

點擊 Next

圖 43

安裝中,等待安裝完成。

圖 45

至此安裝完成,取消勾選後點擊 Finish

確認是否安裝完成

開啟 Visual Studio Code,如果原本就是開啟的狀態,請先關閉後再開啟。

圖 1

按下 Ctrl + J,開啟終端機:

圖 2

輸入 psql -U postgres 嘗試連線到安裝好的資料庫伺服器:

圖 1

會被要求輸入超級使用者 postgres 的密碼:

圖 2

輸入好密碼後按下 Enter

圖 3

看到上述畫面就代表安裝成功,輸入 exit 離開 PostgreSQL:

圖 4

results matching ""

    No results matching ""