This is the fourth day of my participation in the August More text Challenge. For details, see:August is more challenging
The main content of this chapter is to learn to download the redis you need from Github, and then according to the actual needs of the specified configuration file to install the system services, in order to achieve automatic startup of Redis services
Version: 5.0.10
The default port in reIDS is 6397. In order not to affect the running Redis instance on the host, change the port to 16379
Redis file download
According to your needs, go to Github to download the version you need github.com/tporadowski…
If you think redis this tool is very good, want to delve into the source code, you can fork this official library github.com/redis/redis
If you can’t access Github, try the following:
1. Find the hosts file in C:\Windows\System32\drivers\etc\hosts
2. Add the following content to the file
140.82.114.4 github.com
199.232.5.194 github.global.ssl.fastly.net
Copy the code
Install/uninstall the startup service in Windows
The command must be executed in the CMD. You are advised to use the administrator permission
- Open the CMD
- Go to the redis folder directory
The installation
redis-server --service-install redis.windows.conf --service-name redis-6379 --loglevel verbose
Copy the code
uninstall
Rem uninstalls services using system-wide commands
sc delete redis-6379
Rem is handled using the unload command provided by Redis
redis-server --service-uninstall --service-name redis-6379
Copy the code
Starting the server
Rem starts using the configuration file in the current directory
redis-server.exe redis.windows-service.conf
Copy the code
If the configuration file is not specified, the following information is displayed:
D:\Program Files\Redis-x64- 5.0.10 >redis-server.exe
[19224] 26 Jun15:08:20. 441 #oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[19224] 26 Jun15:08:20. 441 #Redis version= 5.0.10,bits= 64,commit= 1c047b68.modified= 0,pid= 19224,just started
[19224] 26 Jun15:08:20. 441 #Warning: no config file specified.using the default config. In order to specify a config
file use redis-server.exe /path/to/redis.conf
[19224] 26 Jun15:08:20. 447 #Could not create server TCP listening socket* : 6379:bind: An operation was attempted on a non-socketCopy the code
Conf file, the actual path is: D:\$recycle.bin \ s-1-5-21-526095006-1361995329-208084219-19111 \$rf7m1cl.10 \redis.conf
Extra amway a good thing, everything, professional do file retrieval, according to multiple keywords or wildcard to check the system to meet the requirements of the file, the basic 1,2 seconds to pull out things, much faster than the Windows built-in search
Starting the client
redis-cli.exe -h 127.0.0.1 -p 16379-h specifies the destination IP -p specifies the port to connect toCopy the code
View configuration items on the cli
# View the specified configuration item127.0.0.1:16379> config get dbfilename127.0.0.1:16379> config get *
Copy the code
Modify configuration items on the cli
127.0.0.1:16379> config set loglevel 'notice'
OK
127.0.0.1:16379> config get loglevel
1) "loglevel"
2) "notice"
Copy the code
Note: The configuration modified through the command line is only available for this run, and the data in the configuration file will be used when the instance is rerun
Basic operation
Return the number of successfully deleted keys. Non-existent keys will be ignored127.0.0.1:16379> del db db1
(integer) 2# Use password to log in to Redis (currently redis does not have password)27.0.0.1:16379> auth wanb
error) ERR Client sent AUTH, but no password is setSwitch db library127.0.0.1:16379> select 1OK # Exit redis quit # keys [pattern] Match all keys of the specified expression # Test regular expression discovery only supported? Placeholders, and * wildcard #? : Matches any character in the current position. # * : matches0-n Contains any charactersCopy the code