In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to install and configure Redis in Centos7". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Centos7 Install Redis0, Update file yum update-y1, Download redis
2, Put the compressed package to Linux, I put it in export/intstall and extract cd export/installtar -zxvf redis-6.2.1.tar.gz3, Installation environment c++//Install c++yum install gcc-c++ -y//View version gcc -v
4. Configure the basic file cd redis-6.2.1make5. Install the service This is the default installation make install This is a custom installation make install PREFIX=/usr/local/redis//The path you want to install is behind
I installed it by default.
The requested URL/cd/usr/was not found on this server. redis-server
Start successfully as shown in the figure below.
Press Ctrl+C to exit. 7. Set background startup
First copy the configuration file to Startup.
cd /cd export/install/redis-6.2.1cp redis.conf /usr/local/bin/7.1, modify the configuration file cd /usr/local/binvim redis.conf here is modify to run in the background
After opening the file, if you want to find it, just type/ + the field you want to find, such as/ daemonized and enter to find it. Press n to indicate the next matching character:
Query this, change the displayed no to yes, and then press esc to enter: wq to save the file.
7.2 Start the service./ redis-server redis.conf7.3. Check whether the process starts ps aux| grep redis
8. Close the service./ redis-cli shutdown9, Simple use redis
Start redis service:
Open redis client:
./ redis-server redis.conf ./ redis-cli
The following is successful:
Test: Pong is correct.
Exit 10. Start the remote connection firewall. firewall-cmd --zone=public --add-port=6379/tcp --permanentfirewall-cmd --reload Modify redis.conf configuration file
Turn off protected-mode mode, when external networks can be accessed directly
Modify redis.conf file, protected-mode should be set to no.// If you need to set the password requirepass space followed by the set password modify the redis.conf file, modify bind 127.0.0.1 to bind * -::* or directly comment out the bind line
This is the format display for setting passwords.
Remember to restart the service after modifying it. redis-cli -h 127.0.0.1-p 6379 shutdown#kill redis server (more violent, use caution) sudo kill -9 pid process number link other ip address redis
The ip here is changed according to the ip address you want to link
./ redis-cli -h 192.168.10.20 -p 6379
remote link with password
./ redis-cli -h IP -p 6379 -a of your server Your password "Centos7 how to install and configure Redis" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
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.