admin 管理员组

文章数量: 1184232

win10安装

官方没有提供windos版本的,下载地址github下载
下载的是解压版。

百度网盘自取https://pan.baidu/s/1XNxBuTASKygIZo88FcRNag
提取码:nhj0

1.环境变量(方便操作)

将redis的解路径配置到path环境变量下:
我这解压是放在E盘的根目录下,按照自己的解压目录即可。

2.测试

运行–>cmd:redis-server看见如下界面即安装完成


客户端连接:redis-cli

3.redis目录下的文件内容

文件内容
redis-server.exeredis的服务器
redis-cli.exeredis的客服端
redis-benchmark.exeredis性能检测的界面,可以看redis的运行状况,进行调优
redis-check-aof.exe用来做数据的持久化操作
redis.windows.confredis的配置文件

4.redis配置文件

redis默认的端口:6379

# Accept connections on the specified port, default is 6379 (IANA #815344).
# If port 0 is specified Redis will not listen on a TCP socket.
port 6379

redis默认的有15个库,可做修改

# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
databases 16

redis刚解压下来默认是没有密码的,我们可在在配置文件中加上,大概在配置文件的443行左右,或者直接搜索 requirepass 即可,找到之后将其打开,并设置自己的密码。

# 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.
#
# requirepass foobared

本文标签: redis