Read Catalogue
Simple Introduction
Chapter 1: Download and install
Section 2: Modifying a configuration file
Chapter 3: Enabling the master-slave Redis Service
Chapter 4: Client Connection-Test synchronization
Chapter 5: Application Scenarios
Chapter 6: Reference links
Simple IntroductionThe role of Redis, can be self-search online, the following
6380 and 6381 to modify the port.Cp/home/www/redis-3.0.2/cluster/6379/redis. conf/home/www/redis-3.0.2/cluster/6380/Cp/home/www/redis-3.0.2/cluster/6379/redis. conf/home/www/redis-3.0.2/cluster/6381/-- Start the
/var/redis/logMkdir/var/redis/runmkdir/var/redis/6379Locate the profile template in the Redis solution directory and copy it to the following location.CP redis.conf/etc/redis/6379.confModify with vim commandDaemonize Yes is set service
Redis as a service, it is already installed
Make Redis a service reference: Redis Quick Start
Create a directory where to store your Redis config files and your data: (Youdao dictionary: Creating a Directory to store
sorted_set_attacktype 7 file_upload
(Integer) 1
127.0.0.1: 65432> zadd sorted_set_attacktyp 6 file_include
(Integer) 1
127.0.0.1: 65432> zadd sorted_set_attacktyp 5 xss
(Integer) 1
(5) add hash127.0.0.1: 65432> hset hash_resume name tanjiti
(Integer) 1
127.0.0.1: 65432> hset hash_resume city shanghai
(Integer) 1
127.0.0.1: 65432> hset hash_resume gender female
(Integer) 1
Now that the test data has been set up, let's assume that when we find a machine equipped with
Install redis and windows redis in windows
1. Download Redis for windows
After searching for the windows version on the official website for a long time, I found that the windows version can be downloaded from the official website. Currently, the windows version is only available on github. The official website only provides the linux version for download.
Offici
I. Introductory OVERVIEW 1. What is it?
redis:remote DIctionary Server (remote dictionary server) is completely open source free, written in C, comply with BSD protocol, is a high-performance (key/value) distributed memory Database , A NoSQL database that runs on memory and supports persistence is one of the most popular NoSQL databases and is also known as a data structure server.
Redis and other Key-value cache products (memcached) have the followin
, all messages sent from the consumer's transient disconnection or reconnection will be lost. For example, functions such as aggregate computing and scripting are limited by the redis single-thread model, it is impossible to achieve a high throughput, so use it with caution.
In this example, centos5.4 is used in Linux.
The following describes how to install apsaradb for redis.
wget http://redis.googlecode
key-value pairs, and the time complexity of the lookup is irrelevant to the number of elements, and the hash table locates the elements by calculating the hash code value to locate the element's position and thus directly accessing the element, so the time complexity of the hash table lookup is O (1).How to be in. Install Redis components in net4.0/4.5?In the previous blog post, install the Redis server si
#改为yes, to ensure that Redis can run in the background pidfile/var/run/ Redis/redis.pid #redis pidlogfile "/var/log/redis/redis.log" #redis日志dir/usr/local/redis/data/ #
underlying service, simplifying the call.
In the above methods, in addition to the VM, antirez finds that the MongoDB method is not suitable either. Therefore, the disktore method is used to implement new disk storage. The details are as follows:
1) read operations: Read through and LRU. Data that does not exist in the memory is pulled from the disk and put into the memory. data that cannot be stored in the memory is eliminated by LRU.
2) write
Utilization and protection of Redis unauthorized access vulnerability What is a redis unauthorized access vulnerability?
Redis, by default, is bound to the 0.0.0.0:6379 . If you do not take the relevant security policy, such as adding firewall rules, avoiding other untrusted source IP access, etc., this will make the Redis
indefinitely (block indefinitely).
redis> EXISTS Job # ensures that two keys do not exist
(integer) 0
redis> EXISTS command
(integer) 0
redis> Blpop job Command # because the key does not exist at first, the operation is blocked until another client makes a PUSH operation on the job or command list.
1) "Job" # Here is p
Recently in the study of Redis cluster solution, see a friend wrote a good point of view, it was first collected. See the original: http://www.zhihu.com/question/21419897Why cluster?In general, in order to improve the responsiveness of the website, the hotspot data is always kept in memory instead of being read directly from the backend database. Redis is a good cache tool. Large web site applications, the
As a result of business needs, 6 servers are configured today with Redis, 4 as Master and 2 as slave. One main one from, master-slave structure.According to the division of business, the number of Redis services mounted by different machines is also different, distributed as follows.
The code is as follows
Copy Code
#master10.0.8.410.0.8.510.0.8.610.0.8.7 #master
Redis installation and configuration tutorial and phpredis extension installation test
1. Download redis-2.8.17.tar.gz: http://download.redis.io/releases/redis-2.8.17.tar.gz;
2. The compilation and installation configurations are as follows:
# Make[Redis-2.8.17] # make PREFIX =/usr/local/
Windows Platform Redis InstallationRedis Windows installation files : Http://code.google.com/p/servicestack/wiki/RedisWindowsDownload#Download_32bit_Cygwin_ Builds_for_windowsMy choice of Redis is the latest version of the installation file, see:after the Redis installation file is unpacked, there are several files. SeeRedis-server.exe:
from:http://blog.csdn.net/love__coder/article/details/8691679Through the previous several blog, we should have a general understanding of Redis, here again, how to connect the Redis server to read and write data?1. Install PHP extensionsA) Install PHP extension Phpredis:[Plain]View Plaincopyprint?
[[emailprotected]tool]#gitclonehttps://github.com/nicolasff/ phpredis.gitphpredis
[[emailprotect
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.