In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to install and configure redis in CentOS". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install and configure redis for CentOS.
Refer to the operation guide provided on redis's official website. The official website address is https://redis.io/download, and there is a download and installation method at the bottom.
Create a directory to download the zip file
Wget https://download.redis.io/releases/redis-6.2.4.tar.gz
Decompression
Tar xzf redis-6.2.4.tar.gz
Go to the folder directory and compile (Note: there is a redis description file "README.md" in this directory, please have time to learn about it)
Cd redis-6.2.4
1. Compile
Make
If the compilation succeeds, start the service directly for verification.
Note: if you do not install the compilation tool, you will get an error. You need to install the compilation tool and delete the error file generated by the redis compilation. The method of installing compilation tools
Yum install gcc
Delete
Make distclean
two。 Verify compilation
Go to the "src" directory and run the "redis-server" file
Cd src
. / redis-server
1. Install redis
The path can be customized, and if you do not carry the "PREFIX" parameter, redis will be installed in the "/ usr/local/bin" directory.
Make install PREFIX=/opt/xxx/redis
two。 Set environment variabl
Vi / etc/profile
Append the environment variable at the end, and the directory is the same as the directory set by redis.
Export REDIS_HONE=/opt/xxx/redis
Export PATH=$PATH:$REDIS_HOME/bin
Make the environment variable effective
Source / etc/profile
3. Create a redis instance
A server can create multiple redis processes with different port numbers.
Go to the "utils" directory (in the extracted redis directory).
Create an instance of redis using the script file provided by redis
Cd utils
. / install_server.sh
Note:
The following error is resolved by modifying the "install_server.sh" file.
Vi install_server.sh
Comment out the following areas (version 6.2.4, around line 76)
The instance was created successfully. The corresponding information of the instance can be seen in the corresponding directory. Multiple instances can be created, but the port number cannot be the same.
At this point, I believe you have a deeper understanding of "CentOS how to install and configure redis". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.