Windows下安裝redis服務

來源:互聯網
上載者:User

標籤:

1.Redis本身不支援windows,但是有另外的團隊在維護著一個windows下的版本

 

2、:

https://github.com/MSOpenTech/redis

2.8的版本在源碼裡面已經不包含windows下的執行檔案,都移動到release裡面去了,所以點擊release去下載。

 

3、下載解壓後

 

4、安裝很簡單,Windows Service Documentation.docx有詳細說明。

1)安裝服務:

redis-server --service-install redis.windows.conf--loglevel verbose

2)卸載服務:

redis-server --service-uninstall

3)啟動服務:

 

redis-server --service-start

注意:在windows 7 64位機器下,啟動如果報錯(其他環境下沒試過)

這個的解決方案是redis.windows.conf中加入:

maxheap 1gb

具體原因不知道為什麼,可能跟我機器環境有關係(我設定成2gb和4gb都會報錯)

4)、停止服務:

 

redis-server --service-stop

 

5、指定服務名和連接埠號碼的安裝:

1)安裝:redis-server --service-install --service-name redisService1 --port 10001

 

注意:上面這種方式安裝服務會,啟動會出錯(Redis service failed to start),所以安裝的時候指定設定檔:

redis-server --service-install redis.windows.conf --loglevel verbose --service-name redisService1 --port 10001

2)卸載:

redis-server --service-uninstall --service-name redisService1 --port 10001

 

3)啟動服務:

redis-server --service-start --service-name redisService1

 

4)停止服務:

redis-server --service-stop --service-name redisService1

 

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.