Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Win7 安裝 Redis 完整教學:下載、解壓、啟動服務、CLI 測試全流程

編輯:Windows 7 系統介紹

Redis 是高效能 key-value 記憶體資料庫,Windows 版本由社群維護 (官方僅支援 Linux)。Win7 下安裝 Redis 需下載對應架構版本、命令列啟動、驗證連線。

安裝步驟

  1. 下載 Windows 版 Redis:
    GitHub: https://github.com/dmajkic/redis/downloads (或 https://github.com/tporadowski/redis/releases 更新版本)
    選擇 redis-<版本>-win32/64.zip 對應系統架構 (Win7 多為 64 位)。
  2. 2. 解壓至安裝目錄 (如 E:\redis\)。 3. 管理員 CMD 切換目錄:
    cd /d E:\redis 4. 啟動伺服器:
    redis-server.exe redis.conf
    顯示 Ready to accept connections 即成功 (預設埠 6379)。 5. 新開 CMD 視窗測試客戶端:
    redis-cli.exe -h 127.0.0.1 -p 6379 -a 密碼 (無密碼省略 -a)
    提示 127.0.0.1:6379> 即連線成功。 6. 功能測試:
    SET test "hello world" → GET test 回傳 "hello world"。

Redis 官網下載頁

下載版本選擇

解壓檔案內容

安裝目錄結構

redis-server 啟動成功

redis-cli 連線成功

SET/GET 測試成功

生產環境部署建議

  • 註冊為 Windows 服務:redis-server.exe --service-install redis.conf → redis-server.exe --service-start。
  • 設定密碼:redis.conf 中 requirepass your_strong_password。
  • 綁定介面:bind 127.0.0.1 僅本機存取,或指定內網 IP。
  • 持久化設定:AOF/RDB 策略根據業務調整。
  • 防火牆開放 6379 僅限信任子網。

注意

  • Windows 版 Redis 非官方支援,效能/穩定性不如 Linux 版。生產環境強烈建議部署於 Linux 容器/虛擬機/WSL2。
  • 記憶體用量監控:INFO memory,防止 OOM。

依循流程,Win7 可快速搭建 Redis 開發/測試環境。

Copyright © Windows教程網 All Rights Reserved