Getting Redis study notes (a) redis installation environment configuration

This blog belongs to the original author without permission prohibited reproduced, please respect the original! If you have questions, please contact QQ509961766

Redis as an efficient caching framework, is widely used in data storage, which at run time data is stored in memory for efficient reading and writing of data, and depending on the persistence of custom rules, which will be occasional persistent data to the hard disk. Also compared to other NoSql database, redis provides a very rich data structures, such as dict, sds, linkedlist, ziplist, set, quicklist, geometry. On the basis of these storage structures on, Redis provides users with a very rich operation selection, such as by zskiplist to achieve some sort of object data type, and sorting is a very time-consuming operation in the database.

(A) Download

Windows Redis 64-bit download address
Here Insert Picture Description

(B) installation

Since redis is not supported by the windows, all the packages are not installed, you need to install the service run the command

//cmd进入Redis 目录
安装服务:redis-server.exe --service-install redis.windows.conf

启动服务:redis-server.exe --service-start

关闭服务:redis-server.exe --service-stop

卸载服务:redis-server.exe --service-uninstall

Open the windows service, redis already run successful
Here Insert Picture Description

(C) change passwords

Redis installed by default there is no password, this is very unsafe, first of all to change your password, there are 2 ways
1. change the password directly in the configuration file, open redis.windows.conf configuration file, find requirepass, followed by the password, after saving redis restart the service.
Here Insert Picture Description
2. Double-click the installation directory into the redis redis-cli.exe start the client directly through the command to change the password, but will fail to restart service

config get requirepass
config set requirepass "这里是密码"

Here Insert Picture Description

(D) Client

Here Insert Picture Description
Double-click the installation directory into the redis redis-cli.exe start the client
first enter the password, and then set hello this key value == world, then get hello values

auth wangpan//密码
set hello world//设置key value
get hello//取值

Here Insert Picture Description

(E) visual management tool

Redis Desktop Manager, a desktop visual management tool very easy to use
Here Insert Picture Description

Published 75 original articles · won praise 44 · views 510 000 +

Guess you like

Origin blog.csdn.net/u013254183/article/details/100185577