当前位置:网站首页>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
边栏推荐
- 网络安全必会的基础知识
- 【点云处理之论文狂读前沿版10】—— MVTN: Multi-View Transformation Network for 3D Shape Recognition
- [point cloud processing paper crazy reading classic version 14] - dynamic graph CNN for learning on point clouds
- AcWing 787. Merge sort (template)
- On a un nom en commun, maître XX.
- LeetCode 515. 在每个树行中找最大值
- Complex character + number pyramid
- Build a solo blog from scratch
- Tag paste operator (#)
- 拯救剧荒,程序员最爱看的高分美剧TOP10
猜你喜欢
LeetCode 513. Find the value in the lower left corner of the tree
Introduction to the basic application and skills of QT
LeetCode 515. 在每个树行中找最大值
LeetCode 535. TinyURL 的加密与解密
Redis learning (I)
dried food! What problems will the intelligent management of retail industry encounter? It is enough to understand this article
Just graduate student reading thesis
[set theory] order relation (chain | anti chain | chain and anti chain example | chain and anti chain theorem | chain and anti chain inference | good order relation)
AcWing 787. 归并排序(模板)
数字化管理中台+低代码,JNPF开启企业数字化转型的新引擎
随机推荐
LeetCode 241. Design priorities for operational expressions
AcWing 788. 逆序对的数量
AcWing 785. 快速排序(模板)
Just graduate student reading thesis
LeetCode 241. 为运算表达式设计优先级
The "booster" of traditional office mode, Building OA office system, was so simple!
LeetCode 871. 最低加油次数
LeetCode 324. 摆动排序 II
String splicing method in shell
LeetCode 57. 插入区间
[point cloud processing paper crazy reading frontier edition 13] - gapnet: graph attention based point neural network for exploring local feature
Vscode connect to remote server
[point cloud processing paper crazy reading classic version 7] - dynamic edge conditioned filters in revolutionary neural networks on Graphs
推荐一个 yyds 的低代码开源项目
Methods of checking ports according to processes and checking processes according to ports
Uc/os self-study from 0
2022-2-13 learning the imitation Niuke project - home page of the development community
LeetCode 1089. 复写零
The difference between if -n and -z in shell
LeetCode 75. Color classification