使用chocolatey(windows包管理工具)安装
官方安装说明
两种方法
- 在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
官方安装说明
在命令中键入
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》
安装到windows服务
在当前目录命令中键入
redis-server --service-install redis.windows.conf
以读取配置文件 redis.windows.conf ,中包括端口号(port 端口号)、授权秘钥(requirepass 秘钥)等
启动服务
在当前目录命令中键入
redis-server --service-start
本文地址:
您可能感兴趣的文章:
如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!
网友评论