在Windows上安裝Redis

微軟官網源碼 https://github.com/MicrosoftArchive/redishtml

這裏介紹安裝Signed binaries版本git

使用Chocolatey(Windows包管理工具)安裝

官方安裝說明 https://chocolatey.org/installgithub

兩種方法redis

  • 在Cmd命令中鍵入
@"%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"
  • 在PowerShell命令中輸入
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

安裝Redis

官方安裝說明 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服務中運行Redis

參考安裝目錄中的文檔《Windows Service Documentation.docx》ui

安裝到Windows服務

在當前目錄命令中鍵入spa

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

以讀取配置文件 redis.windows.conf ,中包括端口號(port 端口號)、受權祕鑰(requirepass 祕鑰)等code

啓動服務

在當前目錄命令中鍵入

redis-server --service-start

 本文地址:http://www.javashuo.com/article/p-odnkfnvt-ba.html

相關文章
相關標籤/搜索