Recently, because of the company's project, went to Kunming on business, of which the first contact with the installation of Redis, Sentinel configuration, learning to many, but also are fur only, this essay write down the knowledge.
1, first introduced the next Redis, to originate from the Baidu Encyclopedia
Redis is a key-value storage system. Similar to memcached, it supports storing more value types, including string (string), list (linked list), set (set), Zset (sorted set-ordered collection), and hash (hash type). These data types support Push/pop, Add/remove, and intersection-set and difference sets, and richer operations, and these operations are atomic. Based on this, Redis supports sorting in a variety of different ways. As with memcached, data is cached in memory to ensure efficiency. The difference is that Redis periodically writes the updated data to disk or writes the modified operation to the appended record file, and Master-slave (Master-Slave) synchronization is implemented on this basis.
Redis is a high-performance Key-value database. The emergence of Redis, to a large extent, compensates for the lack of memcached such key/value storage, in some cases can be a good complement to the relational database. It provides clients such as Java,c/c++,c#,php,javascript,perl,object-c,python,ruby,erlang, which is convenient to use. [1]
Redis supports master-slave synchronization. Data can be synchronized from the primary server to any number of slave servers, from the server to the primary server that is associated with other slave servers. This enables Redis to perform single-layer tree replication. You can write to the data intentionally or unintentionally. Because of the full implementation of the publish/subscribe mechanism, you can subscribe to a channel and receive a complete message release record from the master server when the tree is synchronized anywhere from the database. Synchronization is helpful for the scalability and data redundancy of read operations.
Redis's official address, very good remember, is Redis.io. (specifically checked, the domain name suffix io belongs to the national domain name, is British Indian ocean Territory, namely British Indian Ocean Territory)
Currently, VMware is funding the development and maintenance of REDIS projects.
2. Download RedisI'm installing the redis-window-64bit-2.8.19 version here, so I'll give you the version I installed.
Link: https://pan.baidu.com/s/1hr6gbZI Password: sf95
3. Installing Redisafter downloading the local decompression can be, for example, I was placed in the C:\redis2.8-64bitin general, the default configuration is can be started, in case the wrong to check again redis.windos.conf,ports default Port 6379no other need to change, direct start cancmd goes into C:\redis2.8-64bit, and then commands Redis-server.exe redis.windows.conf to start Redis and see as shown when the boot succeeds
You can see the version of Redis because it is the second boot that will read the data stored before the hard disk, DB loaded from disk
4. Test Redis
This is the server that is started, and then we start the client to try to connect to the Redis server and simply test if the Redis service is normal, start another cmd window, go to the Redis home directory, knock command
Reids-cli.exe
Ignore my directory, because I am using a Mac, installed Windows 32-bit virtual machine, connection to the download is 64-bit (Kunming is tested, available, 32 64-bit configuration)
There is a need to note that if the previous redis.windows,.conf bind configuration is commented out or configured to bind 127.0.0.1, then the boot can be started directly with Redis-cli.exe, if the configuration is a native IP, such as bind 10.211.55.3
Then it must be started with redis-cli.exe-h 10.211.55.3-p 6379来 (some may ask, the default configuration is not OK, why should be configured to their own native IP?) Rear configuration Sentinel will be used)
After starting the client, for example, write a simple test
First Test get redistest, there is no value
Then set redistest 1231231, stored, and then get under, found already stored in, it is so simple.
Here is a blog post explaining the configuration file
Configuration file Explanation: http://blog.csdn.net/l1028386804/article/details/51869081
As for Redis how to use, this everyone Baidu, tutorials a lot, I have just contact not very understand.
Windows under Redis installation