win 7 安裝redis服務【筆記】_Redis

來源:互聯網
上載者:User

win 7 安裝redis服務

Redis官方是不支援windows的,只是 Microsoft Open Tech group 在 GitHub上開發了一個Win64的版本,項目地址是: https://github.com/MSOpenTech/redis

win 7 安裝redis服務類別目錄下載 redis安裝 redis解壓檔案建立批次檔

下載 redis

開啟 https://github.com/MSOpenTech/redis 地址如圖:

點擊releases 選擇相應的版本(以Redis-x64-3.0.501.zip為例):

安裝 redis解壓檔案

將下載的壓縮檔解壓到安裝目錄下, 例如:我安裝在E:\service\Redis-x64-3.0.501

建立批次檔

1、 在redis目錄下建立安裝redis服務批次檔 install.bat(雙擊即可安裝)。

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

2、在redis目錄下建立開啟、關閉服務批次檔 redis-toggle.bat。

@echo offfor /f "skip=3 tokens=4" %%i in ('sc query Redis') do set "zt=%%i" &goto :next:nextif /i "%zt%"=="RUNNING" ( redis-server.exe --service-stop echo redis stopped。) else ( redis-server.exe --service-start echo redis running now。)pause>nul

3、在redis目錄下建立卸載redis服務批次檔 uninstall.bat。

redis-server --service-uninstall

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.