In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to install Redis on Linux". In daily operation, I believe many people have doubts about how to install Redis on Linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to install Redis on Linux". Next, please follow the editor to study!
What is Redis?
Redis is an open source, network-enabled, memory-based, optional persistence key-value pair storage database written in ANSI C. From June 2015, the development of Redis was sponsored by Redis Labs, while from May 2013 to June 2015, its development was sponsored by Pivotal. Until May 2013, its development was sponsored by VMware. According to the monthly ranking website DB-Engines.com, Redis is the most popular key-value pair storage database.
Redis has the following characteristics:
1.Redis supports the persistence of data. It can keep the data in memory on disk and can be loaded and used again when rebooting without causing data loss.
2.Redis supports mapping between five different data structure types, including data of simple key/value types, as well as storage of data structures such as list,set,zset,hash
3.Redis supports data backup in master-slave mode
Redis has the following functions:
1. Memory storage and persistence: redis supports writing data in memory to the hard disk asynchronously, which persists without affecting the continuation of service.
two。 The operation of taking the latest N pieces of data, for example, you can put the ID of the latest 10 comments in the List collection of Redis.
3. Data can set expiration time
4. Bring your own publish and subscribe message system
5. Timer, counter
Redis installation
The installation of Redis for Windows is very simple on the whole, and there are many tutorials on the Internet. Considering that most of the usage scenarios of Redis are on Linux, I will not introduce the installation of Windows here. Friends can search on their own if they are interested. Let's take a look at how to install Redis on Linux.
Environment:
CentOS7
Redis4.0.8
1. First download Redis, download address https://redis.io/, download redis-4.0.8.tar.gz and put it in our Linux directory / opt
Under the 2./opt directory, decompress the file and decompress the command: tar-zxvf redis-4.0.8.tar.gz, as follows:
3. After the decompression, the folder: redis-4.0.8 appears, and go to this directory: cd redis-4.0.8
4. Execute the make command in the redis-4.0.8 directory to compile
5. If you continue to execute make install to install after the make is completed
OK, at this point, our redis is installed successfully.
6. Before we start, we need to make a simple configuration: modify the redis.conf file, change the daemonize no in it to yes, and let the service start in the background, as follows:
7. Start, start redis with the redis-server redis.conf command, as follows:
8. test
First of all, we can enter the console through the redis-cli command, and then test the connectivity through the ping command. If we see pong, the connection is successful, as shown below:
9. Close it. We can close the instance with the shutdown command, as follows:
At this point, the study on "how to install Redis on Linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.