In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Install Redis on a Windows system
Now Internet companies are using distributed caching or distributed databases, in which we, Digital Media, are also using Redis for database reading and writing and distributed caching. Redis is not only simple and flexible, rich in data structure, but also very fast in database reading and writing, and can ease the pressure on mysql. Similar to Memcached, it supports relatively more value types of storage. Includes string (string), list (linked list), set (collection), zset (sorted set-ordered set), and hash (hash type). Like memcached, in order to ensure efficiency, data is cached in memory, except that redis periodically writes updated data to disk or modification operations to additional record files, and realizes master-slave (master-slave) synchronization on this basis.
Redis is a high-performance key-value database. The emergence of redis largely compensates for the deficiency of key/value storage such as memcached. In some cases, it can play a good complementary role to the relational database. It provides clients such as Java,C/C++,C#,PHP,JavaScript,Python, which is easy to use.
Let's briefly talk about the installation and use of redis.
Download and install
1. Download address: https://github.com/downloads/dmajkic/redis/redis-2.4.5-win32-win64.zip. Choose 32-bit or 64-bit according to the computer system. After decompressing, create a new folder Redis-2.4 in the E drive, and copy the extracted files into a total of 7 files, the most commonly used of which are: redis.conf, redis-server.exe, redis-cli.exe.
2. Add the directory where Redis is located to the environment variable, PATH-- (E:\ Redis-2.4), so that you need to switch judgment and enter the full path each time in the command prompt.
Second, start the server and client
1. Click redis-server.exe in the folder, and the following figure shows that the server is enabled and there is currently no client connection.
two。 Click to open the client redis-cli.exe. The default port is 6379.
3. When the client is opened, the server displays the current number of client connections
4.insert value and get value
Here are the commands commonly used by Redis
1.help @-get a list of commands
2.help-help
3.help-list of possible help topics
4.quit-quit
5.client list-gets the status of all current clients
6.shutdown-shuts down the server
7.flushall-- > clear the data from the entire Redis server (delete all key for all databases
8.flushdb-- > clear all key in the current database
Redis has (example: two client connections), and each line represents the information of one connection:
Addr: TCP address of the client, including IP and port
Fd: the file descriptor handle number corresponding to the client connection socket
Name: the name of the connection. It is empty by default and can be set through CLIENT SETNAME.
Age: number of seconds the client survives
Idle: the number of seconds the client is idle
Flages: type of client (N represents normal client. For more types, please see http://redis.io/commands/client-list).
Omem: the size of the output buffer
Cmd: name of the last command executed
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.