Windows安裝Redis

來源:互聯網
上載者:User

標籤:

1:首先下載Redis-x64-2.8.2400.zip。

https://github.com/MSOpenTech/redis/releases/download/win-2.8.2400/Redis-x64-2.8.2400.zip
從下面地址下:https://github.com/MSOpenTech/redis/releases
2:解壓後有如下檔案:

redis-benchmark.exe         #基準測試
redis-check-aof.exe         # aof
redischeck-dump.exe        # dump
redis-cli.exe               # 用戶端
redis-server.exe            # 伺服器
redis.windows.conf          # 設定檔

開啟redis.windows.conf檔案:

這是一個設定檔,指定了redis的參數。如:

第41行:port 6379

第71行:timeout 0

第454行:# maxheap <bytes>

在cmd命令列視窗,定位至解壓檔案夾,輸入命令redis-server.exe  redis.windows.conf

報錯:

解決辦法:

根據提示,是 maxheap 標識有問題,開啟設定檔 redis.windows.conf ,搜尋 maxheap , 然後直接指定好大小約1Gb即可。

......

第454行:# maxheap <bytes>

maxheap 1024000000

.......

再次啟動,OK,成功.

服務啟動成功狀態:

啟動redis服務的cmd視窗,不用關閉,因為服務需要一直執行,關閉服務,直接關閉視窗就行。

新開啟一個cmd視窗,用內建的用戶端工具進行測試 命令【redis-cli.exe】,詳細操作如下。樣本展示了一個基本的讀寫操作,設定set key->age,value->21,get age 得到key的值。

Windows安裝Redis

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.