初识Redis (一)

what is Redis

REmote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统

又称数据结构服务器,因为值(value)可以是 字符串(String), 哈希(Hash), 列表(list), 集合(sets) 和 有序集合(sorted sets)等类型

下载

windows版本: 下载地址https://github.com/MSOpenTech/redis/releases

安装

解压并安装 cmd进入到对应的目录下执行命令

1 启动服务

redis-server.exe

[21168] 27 Mar 17:19:33.766 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server.exe /path/to/redis.conf

提示没有配置文件,执行如下命令生成conf文件

redis-server.exe  redis.windows.conf

2 启动客户端,连接服务器

redis-cli.exe

3 安装为windows服务(解决关闭cmd窗口,Redis服务就停止的问题)

安装命令: redis-server.exe --service-install redis.windows.conf

redis命令行连接服务

启动服务

redis-server --service-start

连接对应服务器

redis-cli.exe -h 127.0.0.1 -p 6379 -a requirepass (-h 服务器地址 -p 指定端口号 -a 连接数据库的密码[可以在redis.windows.conf中配置],默认无密码)

Redis桌面管理工具 -->Redis Desktop Manager

https://redisdesktop.com/

猜你喜欢

转载自www.cnblogs.com/echoqi/p/10618864.html
今日推荐