前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >redis windows 绿色版 配置密码, 启动bat

redis windows 绿色版 配置密码, 启动bat

原创
作者头像
FHAdmin
修改2021-06-11 14:25:44
1K0
修改2021-06-11 14:25:44
举报
文章被收录于专栏:FHADMIN

1. 配置密码,找到 redis.windows.conf 配置文件

代码语言:javascript
复制
# Require clients to issue AUTH <PASSWORD> before processing any other
# commands.  This might be useful in environments in which you do not trust
# others with access to the host running redis-server.
#
# This should stay commented out for backward compatibility and because most
# people do not need auth (e.g. they run their own servers).
# 
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
#这里配置密码,密码root(fhadmin)
requirepass root
# Command renaming.
#
# It is possible to change the name of dangerous commands in a shared
# environment. For instance the CONFIG command may be renamed into something
# hard to guess so that it will still be available for internal-use tools
# but not available for general clients.

2.制作启动脚本。用写字本编辑后,保存为bat格式

代码语言:javascript
复制
redis-server.exe  redis.windows.conf

3. java springboot 链接 redis

代码语言:javascript
复制
#===========Redis配置====fhadmin.org=======
# Redis数据库索引(默认为0)  
spring.redis.database=0
# Redis服务器地址  
spring.redis.host=127.0.0.1
# Redis服务器连接端口  
spring.redis.port=6379
# Redis服务器连接密码(默认为空)  
spring.redis.password=root
# 连接池最大连接数(使用负值表示没有限制)  
spring.redis.pool.max-active=200
# 连接池最大阻塞等待时间(使用负值表示没有限制)  
spring.redis.pool.max-wait=-1
# 连接池中的最大空闲连接 
spring.redis.pool.max-idle=10
# 连接池中的最小空闲连接  
spring.redis.pool.min-idle=0
# 连接超时时间(毫秒)
spring.redis.timeout=2000ms
spring.redis.jedis.pool.max-wait=-1ms
#===========Redis配置====fhadmin.org=======

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 Redis
腾讯云数据库 Redis(TencentDB for Redis)是腾讯云打造的兼容 Redis 协议的缓存和存储服务。丰富的数据结构能帮助您完成不同类型的业务场景开发。支持主从热备,提供自动容灾切换、数据备份、故障迁移、实例监控、在线扩容、数据回档等全套的数据库服务。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档