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 > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you yum and source code how to install redis, I hope you will learn something after reading this article, let's discuss it together!
Yum install redis
First of all, you have to surf the Internet. Cd / etc/yum.repos.d/mv back/*. / yum install epel-release-y yum add epel source yum install redis-y install redis
Vi / etc/redis.conf modifies the following: bind 127.0.0.1 is changed to 0.0.0.0daemonize no (line 128) daemonize yes starts the client to ensure that the server starts: redis-server / etc/redis.confredis-server-v View version redis-cli ping test starts redis-cli ping returns PONG, and starts successfully. Redis-cli link
Source code compilation installs yum install wget-ywget http://download.redis.io/releases/redis-5.0.0.tar.gz
Tar xf redis-5.0.0.tar.gz-C / opt/
Yum install gcc gcc-c++ make-y
Yum install-y tcl
Cd / opt/redis-5.0.0/make distclean cleans up cache
Make compilation make install PREFIX=/usr/local/redis installation
Redis-benchmark: used to test the performance of redis.
Redis-check-aof: when the aof backup file is corrupted, you can use this tool to repair the aof file. How to use it: redis-check-aof-the aof file to be repaired by fix.
Redis-check-rdb: repair corrupted rdb backup files.
Redis-cli: redis client, used to connect to the server.
Redis-server: redis server side, used to start the redis server.
Redis-sentinel: Sentinel mode (widely used in practice) in master-slave mode (slave does not support writing by default). When an exception occurs in master, automatically select one of the slave as master.
?
After connecting to the redis server, you can view the redis server information by directing "info", or you can view the content information known by the server, for example, info replication to view master-slave related information.
Ln-s / usr/local/redis/bin/* / usr/local/bin/ do soft connection mkdir / etc/redis to create redis directory mkdir / var/rediscd / var/redis
Mkdir data log run creates dump file directory, log directory, process pid directory
Cp / opt/redis-5.0.0/redis.conf / etc/redisvi / etc/redis/redis.conf modify the redis configuration file to the following: 69 line bind 0.0.0.0 set listening ip address 92 line port 6379 listening port Default 6379 port 158line pidfile / var/redis/run/redis.pid specify pid file 263 line dir / var/redis/data specify dump directory 171line logfile "/ var/redis/log/redis.log" specify log file 136line daemonize yes causes redis to run redis-server / etc/redis/redis.conf on background to start the redis service
Redis-cli shutdown closes the redis service redis-cli client connection to redis
127.0.0.1barOK127.0.0.1:6379 6379 > set foo bar writes the title foo, the content is barOK127.0.0.1:6379 > get foo, view the content of foo "bar" 127.0.0.1 barOK127.0.0.1:6379 6379 >
After reading this article, I believe you have a certain understanding of "yum and source code how to install redis". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
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.