In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "Centos7 how to install Redis", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Centos7 how to install Redis" this article.
Brief introduction
Redis is an open source (BSD license), in-memory data structure storage, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, collections, sort sets with range queries, bitmaps, super logs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of disk persistence, and provides high availability through Redis Sentinel and automatic partitioning using Redis Cluster.
What is redis?
Memory-based key- value database that supports automatic / manual persistence.
Performance:
Here are the official bench-mark figures:
The test completed 50 concurrent execution of 100000 requests.
The value set and obtained is a 256-byte string.
Results: the speed of reading is 110000 times / s, and the speed of writing is 81000 times / s.
Support language
Redis official website
Redis
Redis.io/
Data types supported by Redis
String 、 hash 、 list 、 set 、 sorted set
Installation
Installation dependency
Yum install gcc-c++-y
Create installation directory, compile, install
Download address
Wget http://download.redis.io/releases/redis-5.0.5.tar.gz
#-p make sure the directory name exists, and create one if it doesn't exist
Mkdir-p / home/software/redis
#-z: with gzip attribute,-x: decompress,-v: show all procedures,-f: use the file name, remember, this parameter is the last parameter, only the file name can be followed.
Tar zxvf redis-3.0.6.tar.gz
Cd redis-3.0.6
# make is used to compile. It reads instructions from Makefile and then compiles
# make install is used for installation. It also reads instructions from Makefile and installs to the specified location. PREFIX selects the directory to install.
Make & & make PREFIX=/home/software/redis install
Copy configuration files, start
Cd redis-5.0.5/
Cp redis.conf / home/software/redis/bin
Modify / usr/local/redis/bin/redis.conf (the following changes are based on redis5.0.5 other versions of redis may be different)
Use the vim editor to enter: set number displays the number of lines (provided you have installed vim)
Whether or not to act as a daemon thread, Redis will write the pid file in / var/run/ Redis. When monitoring pid
On line 136
Daemonize yes
To modify the number of instances
On line 186
Databases 32
Comment binding ip, you can connect to redis to get ip
# bind 127.0.0.1
Add access password
On line 507
Requirepass redis
Start
Change to the bin directory under the installation directory
Execute the command, this configuration file is just copied from the unzipped directory
. / redis-server redis.conf
View the process
Ps-ef | grep redis
Test connection
The above is all the contents of the article "how to install Redis in Centos7". 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.
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.