In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
What this article shares with you is a detailed installation tutorial for building a Redis cluster. I believe most people do not know how to build it. In order to let you learn, I have summarized the following contents. Without saying much, let's read on.
1. Relation database
Relational database is a structured database, which is based on relational model and is generally record-oriented. It deals with the data in the database with the help of mathematical concepts and methods such as set algebra. A relational model refers to a two-dimensional table model, so a relational database is a data organization of two-dimensional tables and their relationships.
Mainstream relational databases include: Oracle,Mysql,SQL Server,Mrcrosoft Access,DB2, etc.
two。 Non-relational database
NoSQL (NoSQL = Not Only SQL), which means "not just SQL" is a general term for non-relational databases. Mainstream NoSQL databases are: Redis,MongBD,Hbase,CouhDB and so on. These databases, their storage mode, storage structure and use scenarios are completely different. So we think of it as a collection of non-relational databases, rather than a general term like relational databases. In short, databases other than mainstream relational databases are non-relational.
3. The background of non-relational database
With the rise of Web 2.0 websites, relational databases have exposed many problems that are difficult to solve, such as the following three high problems, when dealing with Web 2.0 websites, especially the Web 2.0 pure dynamic websites with massive data and high concurrency of SNS type.
High performance- requirements for highly concurrent data read and write Huge Storage- requirements for efficient storage and access of massive data High Scalability & requirements for database scalability and high availability
Introduction to 4.Redis
Redis is a non-relational database, is an open source, written in C language, support the network, can be based on memory can also be persistent log-type, key-value (value pair) database, is an indispensable part of the current distributed architecture. The Redis server program is a single-process model, that is, multiple Redis processes can be started on one server at the same time, while the actual processing speed of Redis completely depends on the execution efficiency of the main process. If only one Redis process is running on the server, the processing capacity of the server will decrease to a certain extent when multiple clients visit at the same time; if multiple Redis processes are started on the same server, Redis will not only improve the high concurrent processing capacity, but also cause great pressure on the server's CPU. In other words, in the actual production environment, you need to decide how many Redis processes to start according to the actual environment.
1) Redis has the following advantages: extremely high data reading and writing speed, the highest data reading speed can reach 110000 times / s, and the highest data writing speed can reach 81000 times / s. Support a wide range of data types, not only simple key-value data types, but also Strings,lists,hashes,sets and ordered sets data type operations. Support the persistence of data, you can save the data in memory on disk, and you can load it again when you restart it. Atomicity, all operations of Redis are atomicity. Data backup is supported, that is, data backup in master-salve mode. Redis installation and deployment
Link to Redis installation package: https://pan.baidu.com/s/1Yh9O7eE0AH_m15b-dPQ-PQ extraction code: kn32 [root@localhost media] # tar zxf redis-3.2.9.tar.gz-C / usr/src/ [root@localhost media] # cd / usr/src/redis-3.2.9/ [root@localhost redis-3.2.9] # make & & make install
1) make install only installs binaries to the system and does not have startup scripts and configuration files. The package provides an install_server.sh script file by default, which allows you to set up the relevant configuration files required by the Redis service. When the script is finished, the Redis service is started, and the default listening = port is 6379.
[root@localhost redis-3.2.9] # cd / usr/src/redis-3.2.9/utils/ [root@localhost utils] #. / install_server.sh / / initialize [root@localhost utils] # netstat-anpt | grep redistcp 0 0127.0.0.1 root@localhost utils 6379 0.0.0.0 * LISTEN 8179/redis-server 1
2) after installation, you can control the Redis service through the Redis service control script / etc/init.d/redis_6379, such as stopping the Redis service, starting the Redis service, restarting the Redis service, and checking the running status of Redis.
[root@localhost ~] # / etc/init.d/redis_6379 stopStopping... Waiting for Redis to shutdown... Redis stopped [root@localhost ~] # / etc/init.d/redis_6379 startStarting Redis server... [root@localhost ~] # / etc/init.d/redis_6379 restartStopping... Redis stoppedStarting Redis server... [root@localhost ~] # / etc/init.d/redis_6379 statusRedis is running (9556)
3) configuration parameters
The Redis main configuration file is / etc/redis/6379.conf, which consists of comment lines and settings lines. The annotative text begins with "#" and contains a description and explanation of the relevant configuration.
This is the end of the building of Redis cluster. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
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.