Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed graphic tutorials for installing Redis on Windows system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Redis is officially supported for Linux. There is nothing to say about installation and use. General use can be done in less than 5 minutes according to official instructions. For more information, please refer to:

Http://redis.io/download

But sometimes want to toss down Redis under windows, the official does not support windows.

Finally, if you need to download redis, you can download it here:

Https://www.jb51.net/softs/541181.html

After decompression, you can come according to the operation flow. Remember, my redis has a password. If you don't want to set the password, you can change it manually in the configuration file. How to change it is mentioned below.

After downloading, decompress it directly without installation. The catalogue is as follows:

Type cmd here and press enter or shortcut key: the key between crtl and alt (windows key) + R key

Enter the DOC operating system window. The figure below is as follows

Find the redis decompression path, mine is: F:\ kgdxkj\ USB disk\ 123456\ New folder\ 2.8.21\ 2.8.21

At this time, in the DOC operating system, the first step is to enter f: enter (my directory is on F disk, so enter f:), the second step is to enter cd F:\ kgdxkj\ U disk\ 123456\ new folder\ 2.8.21\ 2.8.21 enter, and the third step is to enter redis-server.exe redis.windows.conf enter (note: there is a space after cd) to start the redis service.

The doc window that starts the redis service does not need to be closed, because the service needs to be executed all the time. If you want to close the service, just close the DOC window.

Let's start the test using:

First, open a DOC operating system window, the first two steps are the same as before, the first step is to enter f: enter (my directory is on F disk, so enter f:), the second step is to enter cd F:\ kgdxkj\ U disk\ 123456\ new folder\ 2.8.21\ 2.8.21 enter, (note: there is a space after cd) the third step is to enter redis-cli enter

So the client of redis is opened by us, and now we can enter the operation of redis. Redis operates by g "read" and "write" to the operation of key, such as: set abc 123456789, which means to set a key, the name abc, its value is 123456789. The sentence "get abc" means to read the name of key is the value of abc. If the following error occurs: then your redis may have a password, how to check the password of redis, enter the redis directory, find the redis.windows.conf configuration file, search: requirepass, find it, see if there is a password, here my password is xwtec123

At this point, we enter auth xwtec123 and enter, and it will be fine.

Finally, we enter the read and write operations for redis as follows:

There is no brief description of the operation of redis. Here are a few simple demonstrations.

Keys *: it means to check all the key in redis. Currently, there are 5 key in my redis as shown below:

If we want to see that key is the value of abc, we can enter the get abc value of 123456789

If we want to see that key is the value of userName_1111, we can enter that the getuserName_1111 value is something I saved myself, as shown in the following figure:

If you want to delete the specified key, you can use del key in front of my redis has 5 key, now I delete key is abc, and then keys *, query all key is 4, abc this key has been deleted. The figure below is as follows

It's over!

The rest depends on everyone's own research.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report