Install and configure Redis in CentOS6.3

Source: Internet
Author: User
The vm is introduced to improve Redis performance, that is, to save seldom used values to disk, and to store keys in memory. In fact, if you have 10 million keys in the memory

The vm is introduced to improve Redis performance, that is, to save seldom used values to disk, and to store keys in memory. In fact, if you have 10 million keys in the memory

System Environment: CentOS 6.3 X86_64

Redis Introduction

Redis is essentially a Key/Value database, similar to the NoSQL database of Memcached, but its data can be stored persistently on the disk, solving the problem of no data loss after service restart, the value can be string, list, sets, or ordered sets ), all data types include push/pop, add/remove, server union, intersection, and difference between two sets. These operations are atomic, redis also supports various sorting capabilities

Redis 2.0 adds many new features, such as improved performance, new data types, and less memory utilization (AOF and VM)

Redis supports most mainstream development languages, such as C, Java, C #, PHP, Perl, Python, Lua, Erlang, and Ruby.

Redis features:

1. Redis Sharding: Redis supports the Sharding function of the client through consistent hash algorithm. Currently, Redis does not support fault redundancy and cannot be added or deleted online in the cluster.

2. Redis master/slave replication:

1) one master supports multiple slave instances.

2). Slave can accept connections from other slave instances to connect to the master.

3). replication on the master node is non-blocking, while on the slave it is blocked.

4) replication is used to provide scalability. On the slave side, only query functions and data redundancy are provided.

3. Redis Virtual Memory function: vm is a very stable and reliable function added by Redis2.0,

The vm is introduced to improve Redis performance, that is, to save seldom used values to disk, and to store keys in memory. In fact, if you have 10% keys in the memory and only about keys are frequently used, Redis can try to convert infrequently used values to disks by enabling the VM to save

4. Redis's additional file (AOF) function: Redis saves the dataset to aof through the configured policy. After Redis crashes, it can be restored to the previous status through aof.

Redis installation and configuration:

[Root @ chen download] # wget [url = http://redis.googlecode.com/files/redis-2.0.0-rc4.tar.gz##/url]
[Root @ chen download] # tar zxvf redis-2.0.0-rc4.tar.gz
[Root @ chen download] # cd redis-2.0.0-rc4
[Root @ chen redis-2.0.0-rc4] # make

[Root @ chen redis-2.0.0-rc4] # mkdir ~ /Redis
[Root @ chen redis-2.0.0-rc4] # cp redis-server ~ /Redis
[Root @ chen redis-2.0.0-rc4] # cp redis-benchmark ~ /Redis
[Root @ chen redis-2.0.0-rc4] # cp redis-cli ~ /Redis
[Root @ chen redis-2.0.0-rc4] # cp redis. conf ~ /Redis
[Root @ chen redis-2.0.0-rc4] # cd ~ /Redis

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.