1.Redis Introduction
Redis is a key-value storage system. Like memcached, it supports a relatively larger number of stored value types, including string (string), list (linked list), set (set), and Zset (ordered set). These data types support Push/pop, Add/remove and intersection-set and differential sets and richer operations, and these operations are atomic. On this basis, Redis supports a variety of different ways of ordering. As with memcached, data is cached in memory to ensure efficiency. The difference is that Redis periodically writes the updated data to the disk or writes the modification operation to the appended record file, and on this basis, it realizes the Master-slave (master-slave) synchronization.
Redis is a high-performance key-value database. The emergence of Redis, to a large extent, compensates for the shortage of such keyvalue storage in memcached, and in some cases can complement the relational database well. It provides a python,ruby,erlang,php client and is easy to use.
2. Physical environment
master:192.168.1.249 Centos 5.5
slave:192.168.1.244 Centos 5.5
3. Get Redis Package
Download the latest stable version of redis-2.6.4.tar.gz at Redis's official website (http://www.redis.io).
4. Installation configuration Redis main service.
4.1 Unpack the package with TAR-ZXVF.
4.2 Compile and install Redis service with make && make install.
4.3 Create the Redis master configuration file directory and copy redis.conf to the directory below.