首页 > 数据库 >Redis的安装和部署教程(Windows环境)

Redis的安装和部署教程(Windows环境)

时间:2024-03-22 18:00:03浏览次数:18  
标签:教程 Windows Redis redis will -- bind save

一、安装Redis服务

1、下载Redis压缩包

以下这个是我网盘里面的(这个是v8.0版本的,支持导入.rdb数据文件

链接:百度网盘 请输入提取码

提取码:x0f1

--来自百度网盘超级会员V5的分享

2、解压到文件夹

将下载的压缩包解压到指定的文件夹中,如:D:\redis,内容如下:

3、修改redis.conf

把以下内容直接全部替换掉redis.conf里面的内容,注意是全部覆盖掉,如自己知道怎么修改配置文件的请自便,嘻嘻嘻~~~

# Save the DB to disk.
# save <seconds> <changes> [<seconds> <changes> ...]
#
# Redis will save the DB if the given number of seconds elapsed and it
# surpassed the given number of write operations against the DB.
#
# Snapshotting can be completely disabled with a single empty string argument
# as in following example:
#
# save ""
#
# Unless specified otherwise, by default Redis will save the DB:
#   * After 3600 seconds (an hour) if at least 1 change was performed
#   * After 300 seconds (5 minutes) if at least 100 changes were performed
#   * After 60 seconds if at least 10000 changes were performed
#
# You can set these explicitly by uncommenting the following line.
#
# save 3600 1 300 100 60 10000

save ""
port 6379 
requirepass '123456' 
maxmemory 256mb
appendonly no
maxmemory-policy allkeys-lru

# Examples:
#
# bind 192.168.1.100 10.0.0.1     # listens on two specific IPv4 addresses
# bind 127.0.0.1 ::1              # listens on loopback IPv4 and IPv6
# bind * -::*                     # like the default, all available interfaces
#
# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
# internet, binding to all the interfaces is dangerous and will expose the
# instance to everybody on the internet. So by default we uncomment the
# following bind directive, that will force Redis to listen only on the
# IPv4 and IPv6 (if available) loopback interface addresses (this means Redis
# will only be able to accept client connections from the same host that it is
# running on).
#
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
# COMMENT OUT THE FOLLOWING LINE.
#
# You will also need to set a password unless you explicitly disable protected
# mode.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

bind 127.0.0.1

# Redis supports recording timestamp annotations in the AOF to support restoring
# the data from a specific point-in-time. However, using this capability changes
# the AOF format in a way that may not be compatible with existing AOF parsers.
#aof-timestamp-enabled no

# Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
# This makes the format more resistant to corruption but there is a performance
# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
# for maximum performances.
#
# RDB files created with checksum disabled have a checksum of zero that will
# tell the loading code to skip the check.

rdbchecksum no

# By default protected mode is enabled. You should disable it only if
# you are sure you want clients from other hosts to connect to Redis
# even if no authentication is configured.

protected-mode yes

4、启动Redis服务

在Redis的安装目录下打开cmd窗口,然后执行命令来启动服务:

redis-server --service-start

出现以上提示则表示启动成功~嘻嘻嘻~

为了方便,建议把Redis路径配置到系统变量Path值中,这样就省得再输路径了。

Redis常用的服务指令

# 卸载服务
redis-server --service-uninstall
 
# 开启服务
redis-server --service-start

# 停止服务
redis-server --service-stop 

二、使用可视化工具

Redis Desktop Manager

需要安装使用,0.9.4以上是要收费的

链接:百度网盘 请输入提取码

提取码:qwqp

--来自百度网盘超级会员V5的分享

把安装包下载下来,改一下安装路径,然后不断下一步即可

无需任何配置直接连接-》

界面如下:

这样就可以可视化操作Redis数据库了~~

标签:教程,Windows,Redis,redis,will,--,bind,save
From: https://blog.csdn.net/m0_63550153/article/details/136812033

相关文章

  • 【教程】深入探究 JS代码混淆与加密技术
     ......
  • Redis学习
    1.1缓存使用场景1)访问量很大的时候,DB数据在磁盘上。如果加入缓存,可以先去缓存读,如果没有再去DB读。可以减轻访问压力Redis没有锁,单线程、单进程。读11w/s,写8万/s2)做Session分离在各个Tomcat间复制3)做分布式锁4)做乐观锁1.2缓存的概念 缓存是在CPU上的高速......
  • LRC软件、Adobe Lightroom Classic最新版破解安装下载合集教程
    AdobeLightroomClassic(简称LR)是AdobeCreativeCloud大家庭中的一款专业的图片管理和编辑工具,用于专业摄影师、摄影爱好者以及所有不断优化数码影像的人等。其目标是以丰富的功能提供高效、一致的体验,帮助用户汇聚、组织、管理、编辑和分享数码图片。AdobeLightroomClassi......
  • EndNote X9.3.3安装使用教程(附下载链接)
    EndNoteX9.3.3是一款非常nice的实用型文献管理软件,EndNoteX9功能极其强劲,便捷好用。安装教程解压后,会出现下面两个文件(其中一个是中文参考文献格式,另一个是安装文件)双击打开EndNotex9.3.3中科大英文版安装包,点击Next勾选Iacceptthelicenseagreement,点击N......
  • 使用FastAPI+SQLAlchemy+Redis+Celery 编写一个完整的用户登录验证API
    使用PyQt5+FastAPI+SQLAlchemy+Redis+Celery做一个登录注册页(三)本文将介绍用PyQt5+FastAPI+SQLAlchemy+Redis+Celery做的一个登录注册页,使用邮箱接收验证码,本文介绍是前后端分离的实现方式,厚后端使用FastAPI+SQLAlchemy+Redis+Celery,你可以将PyQt5改为PySide2以获得更宽松......
  • 【教程】高效数据加密混淆方法及实现简介
     背景在需要对数据进行传输或者表达时,通常要求数据加密的安全级别不高,但希望加解密时间复杂度尽可能低。这时使用传统的对称加密(如3DES、AES)或非对称加密(如RSA、ECC)显然不太适合。因为加密的安全级别和加解密时间复杂度之间存在矛盾。所以,我们需要寻找一种方法,在保证安全性的同......
  • Redis系列十:Pipeline详解
    转载自:https://blog.csdn.net/w1lgy/article/details/84455579一、pipeline出现的背景:redis客户端执行一条命令分4个过程:发送命令-〉命令排队-〉命令执行-〉返回结果 1这个过程称为Roundtriptime(简称RTT,往返时间),mgetmset有效节约了RTT,但大部分命令(如hgetall,并没......
  • 4 Redis持久化
    Redis是一个内存数据库,所以其运行效率非常高。但也存在一个问题:内存中的数据是不持久的,若主机宕机或Redis关机重启,则内存中的数据全部丢失。当然,这是不允许的。Redis具有持久化功能,其会按照设置以快照或操作日志的形式将数据持久化到磁盘。根据持久化使用技术的不同,Red......
  • Redis系列之高可用集群模式介绍
    Redis系列之高可用集群模式介绍1.Redis主从模式1.1什么是主从模式?主从模式,是redis集群最基本的模式,主库负责读写,从库负责读。主库的数据会同步到从库,但是从库写的数据不会自动同步到主库,除非用写脚本等方式手动同步。这种模式应急能力比较差,假如出现宕机的情况,需要手动......
  • Windows server 系统 AD域、加入域——无法加入 Windows Server 2012 R2 或 Windows 7
    目录前言症状原因解决方案更多信息前言       大家好,我是你可知这世上再难遇我 创作者,最近工作中做项目的时候,做Windows服务器数据迁移,前期得加入前服务器的AD域控中,经过一天从早到晚,最终在下班后找到解决方法,现在分享一下我当时最后的解决问题的方式!......