微軟官網源碼 https://github.com/MicrosoftArchive/redishtml
這裏介紹安裝Signed binaries版本git
官方安裝說明 https://chocolatey.org/installgithub
兩種方法redis
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
官方安裝說明 https://chocolatey.org/packages/redis-64/shell
在命令中鍵入windows
choco install redis-64
默認安裝目錄 C:\ProgramData\chocolatey\lib\redis-64。安裝目錄中有相關介紹文檔《Redis on Windows.docx》、《Redis on Windows Release Notes》、《Windows Service Documentation.docx》工具
參考安裝目錄中的文檔《Windows Service Documentation.docx》ui
在當前目錄命令中鍵入spa
redis-server --service-install redis.windows.conf
以讀取配置文件 redis.windows.conf ,中包括端口號(port 端口號)、受權祕鑰(requirepass 祕鑰)等code
在當前目錄命令中鍵入
redis-server --service-start