【教程】windows环境安装Redis

下载

配置

将下载好的zip文件解压,我这里以D:\Application_Redis为例

打开系统环境变量

path中新增D:\Application_Redis即可

测试

在cmd下,查看redis版本

C:\Users\admin>redis-cli -v

redis-cli 5.0.10 (git:1c047b68)

启动Redis服务

C:\Users\admin>redis-server
[4376] 15 Jul 14:53:21.284 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[4376] 15 Jul 14:53:21.284 # Redis version=5.0.10, bits=64, commit=1c047b68, modified=0, pid=4376, just started
[4376] 15 Jul 14:53:21.285 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 5.0.10 (1c047b68/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 4376
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

[4376] 15 Jul 14:53:21.294 # Server initialized
[4376] 15 Jul 14:53:21.295 * Ready to accept connections

保持启动状态,新开一个cmd窗口,连接Redis

C:\Users\admin>redis-cli

127.0.0.1:6379>

set、get测试

127.0.0.1:6379> set key-test "tets-value"
OK
127.0.0.1:6379> get key-test
"tets-value"
127.0.0.1:6379>

ctrl+c,退出,完结,★,°:.☆( ̄▽ ̄)/$:.°★

posted @ 2022-07-15 15:07  小拳头呀  阅读(401)  评论(0编辑  收藏  举报