当前位置:网站首页>Windows安装Redis详细步骤
Windows安装Redis详细步骤
2022-07-03 09:00:00 【小胡今天有变强吗】
前言
有个需求需要在Windows上安装Redis,中间碰到一些错误,参考了网上的一些资料,进行总结记录,以免以后用到。
下载Windows版安装包
官网只提供linux版本的下载,但是github提供有Windows的版本。
github地址: https://github.com/MicrosoftArchive/redis/releases
选择 Redis-x64-3.0.504.zip 文件并下载,
安装Redis
安装非常简单,将上面下载的安装包解压到固定的目录,比如我解压到了 E:\App\Devlp\redis 目录之下。
添加环境变量,将reids安装目录添加到环境变量Path中。注意替换成自己的安装路径。
启动Redis测试
在安装目录下输入cmd并回车。输入
redis-server redis.windows.conf
并回车。出现如下界面说明安装成功。
Redis服务相关配置
- 修改redis.windows-service.conf配置文件,修改Redis的密码
将 requirepass:xxx 修改为requirepass :123456
2. 创建日志文件夹,否则启动redis服务时会报错。
redis.windows-service.conf配置文件中 logfile 设置的目录,并在redis-server.exe所在文件夹创建目录文件夹。
踩坑记录:注意一定要在安装目录下创建 Logs/redis_log.txt 文件,否则会导致Redis服务启动不起来。
设置服务
cmd 输入
redis-server --service-install redis.windows-service.conf --loglevel verbose
输入命令之后如果不报错,服务设置成功,右键计算机—管理----服务,可以看到已经有Redis服务了。
启动Redis服务
输入命令:
redis-server --service-start
出现下图所示,表示服务启动成功。
查看Redis服务,已经变成了正在运行。
常用的Redis服务命令
开启服务:redis-server --service-start
停止服务:redis-server --service-stop
卸载服务:redis-server --service-uninstall
边栏推荐
- Shell script kills the process according to the port number
- Computing level network notes
- Gaussian elimination acwing 883 Gauss elimination for solving linear equations
- 【点云处理之论文狂读经典版12】—— FoldingNet: Point Cloud Auto-encoder via Deep Grid Deformation
- LeetCode 715. Range module
- 剑指 Offer II 029. 排序的循环链表
- MySQL installation and configuration (command line version)
- C language programming specification
- On a un nom en commun, maître XX.
- [set theory] order relation (eight special elements in partial order relation | ① maximum element | ② minimum element | ③ maximum element | ④ minimum element | ⑤ upper bound | ⑥ lower bound | ⑦ minimu
猜你喜欢
LeetCode 715. Range 模块
拯救剧荒,程序员最爱看的高分美剧TOP10
我们有个共同的名字,XX工
LeetCode 30. Concatenate substrings of all words
Gaussian elimination acwing 883 Gauss elimination for solving linear equations
[advanced feature learning on point clouds using multi resolution features and learning]
LeetCode 513. 找树左下角的值
Recommend a low code open source project of yyds
What is an excellent fast development framework like?
LeetCode 515. Find the maximum value in each tree row
随机推荐
Go language - Reflection
[point cloud processing paper crazy reading classic version 13] - adaptive graph revolutionary neural networks
Internet Protocol learning record
Beego learning - JWT realizes user login and registration
Vs2019 configuration opencv3 detailed graphic tutorial and implementation of test code
【Kotlin学习】类、对象和接口——定义类继承结构
Complex character + number pyramid
Problems in the implementation of lenet
Basic knowledge of network security
dried food! What problems will the intelligent management of retail industry encounter? It is enough to understand this article
We have a common name, XX Gong
LeetCode 515. 在每个树行中找最大值
Too many open files solution
【Kotlin学习】类、对象和接口——带非默认构造方法或属性的类、数据类和类委托、object关键字
LeetCode 508. The most frequent subtree elements and
低代码前景可期,JNPF灵活易用,用智能定义新型办公模式
[point cloud processing paper crazy reading frontier version 10] - mvtn: multi view transformation network for 3D shape recognition
Shell script kills the process according to the port number
Discussion on enterprise informatization construction
Bert install no package metadata was found for the 'sacraments' distribution