In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article to share with you is about how to install Redis in Linux, Xiaobian feel quite practical, so share to everyone to learn, I hope you can read this article after some harvest, not much to say, follow Xiaobian to see it.
I. Introduction to Redis
Redis is one of the most popular NOSQL systems and is a key-value storage system. Similar to Memcache, but largely compensating for Memcache's shortcomings, it supports a relatively large number of stored value types, including string, list, set, zset, and hash. These data types all support push/pop, add/remove, and take intersection union and subtraction, as well as richer operations. On this basis, Redis supports a variety of different ways of sorting.
II. Installation of Redis
1. First download Redis compressed package on official website, address: https://redis.io/download stable version, currently I download version 4.0.8.
2. Copy the compressed package to Linux server through remote management tool and perform decompression operation.
3. Enter the decompressed directory and execute make to compile and install the decompressed Redis file.
After the compilation is completed, you can see that the decompression file redis-4.0.8 will have corresponding src, conf and other folders, which are the same as the files installed and decompressed under windows. Most installation packages will have corresponding class files, configuration files and some command files. Go to src directory, which contains many key files:
4. For ease of management, copy the conf configuration file in the redis-4.0.8 file directory and the common commands in the src directory to the unified file:
III. Use of Redis
1. service startup
Enter the directory/usr/local/redis/bin where you placed the Redis startup file and execute the redis-server script file:
Note: The Redis service started by Redis-server is directly executed here, which runs directly in the foreground (the effect is as shown in the figure above). That is to say, after executing this command, if Lunix closes the current session, the Redis service will also be closed immediately. Under normal circumstances, starting Redis services requires starting from the background and specifying a startup profile.
2. Start redis service in background
a. Modify the/usr/local/redis/etc/redis.conf configuration file to turn on background startup, i.e. set the daemonize option from no to yes.
b. Start the redis service again and specify the startup service profile to execute the command
./ redis-server /usr/local/redis/etc/redis.conf
You can see that the Redis service has been started, and the version information and process number are returned, indicating that Redis has been started.
3. simple use
Execute the redis-cli operation script, enter the Redis operating environment, set the variable name and variable value in the form of key-value pairs, and then you can get its value through the variable name:
The above is how to install Redis in Linux, Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.