In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to install redis4.0.1 in the CentoS6.5 environment, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The details are as follows:
Dependent environment
Centos 6.5
Gcc-4.4.7: compiling redis original files
Tcl-8.5.7: run compilation detection
1. Compile redis
# cd / usr/local#tar-zxvf redis-4.0.1.tar.gz#mv redis-4.0.1 redis#cd redis#make
Tcl-8.5 or above is required to run a compiled test make test
# yum install-y tcl#make test
two。 Start redis
# cd src#./redis-server
3. Visit redis
# cd. / redis-cli
It is recommended to install the latest version. When accessing the Linux side, there is a hint of code format for easy practice.
> set name "redis" > get name
4. Master-slave replication
Deploy two redis services on one machine
# cd / usr/local
4.1. Create a redis with service port 6379 (master)
# mv redis redis-6379#mkdir redis-6380
4.2. Redis with service port 6380 (from)
# cp-r redis-6379 redis-6380#cd redis-6380
4.3. Change the port and set the ip and port of the primary redis
# vi redis.confport=6380slaveof 127.0.0.1 6379
4.4. Start the master redis first and then start the slave redis
# cd / usr/local/redis-6379/src#./redis-server.. / redis.conf#cd / usr/local/redis-6380/src#./redis-server.. / redis.conf
4.5. Test master-slave redis
#. / redis-cli-p 6379 > set name "redis" > get nameredis > quit#./redis-cli-p 6380 > get nameredis
Tip: if you test the redis master-slave replication between different servers, you need to note that the IP bound by redis needs to be changed to an open access ip (127.0.0.1-> 192.168.2.134), and open ports are also needed in the firewall.
The above is all the contents of the article "how to install redis4.0.1 in CentoS6.5 Environment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.