Redis database series (1)

Source: Internet
Author: User
Tags install redis value store
I. What is redis: Redisisanopensource, BSDlicensed, advancedkey-valuestore.Itisoftenreferredtoasadatastructureserversincekeyscancontainstrings, hashes, lists, setsandsortedsets. redis is open source, BSD license, advanced key-value storage system. can be used for storage

I. What is redis: Redisisanopensource, BSDlicensed, advancedkey-valuestore.Itisoftenreferredtoasadatastructureserversincekeyscancontainstrings, hashes, lists, setsandsortedsets. redis is open source, BSD license, advanced key-value storage system. can be used for storage

I. What is redis:

Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

Redis is an open-source, BSD license, and advanced key-value storage system. It can be used to store strings, hash structures, linked lists, and collections. Therefore, it is often used to provide data structure services.

Ii. What is unique between redis and memcached:

1: redis can be used for storage (storge), while memccached is used for cache)

This feature is mainly because of its "persistence" function.

2: the stored data has a "structure". For memcached, there is only one type of stored data-"string ",

Redis can store strings, linked lists, hash structures, sets, and ordered sets.


Iii. Download and install Redis

1: Official Site: redis. io download the latest version or the latest stable version

2: extract the source code and enter the Directory


3: No configure required

4: make directly


(For 32-bit machine make 32bit)

Note: The time is incorrect for easy-to-use problems.

Cause: the source code has been officially configure, but when the official configure is used, the generated file has the timestamp information,

Make can only happen after configure,

If the time of your VM is incorrect, for example, 2012

Solution: date-s 'yyyy-mm-dd hh: mm: ss' rewrite time

Write clock-w to cmos again

5. Optional steps: make test to test compilation

(This may occur when: need tcl> 8.4, yum install tcl)


6: Install it to a specified directory, such as/usr/local/redis.

Make PREFIX =/usr/local/redis install

Note: The PREFIX must be capitalized.


7. After make install, obtain the following files:

Redis-benchmark performance testing tool

Redis-check-aof Log File detector (for example, log damage caused by power failure can be detected and repaired)

Redis-check-dump snapshot file detection tool, effect class

Redis-cli Client

Redis-server

8: copy the configuration file

Cp/path/redis. conf/usr/local/redis

9: Start and connect

/Path/to/redis/bin/redis-server./path/to/conf-file

For example, [root @ localhost redis] #./bin/redis-server./redis. conf

Connection: Use redis-cli

#/Path/to/redis/bin/redis-cli [-h localhost-p 6379]

10: Run redis later Processes

Edit the conf configuration file and modify the following content;

Daemonize yes

Client Connection

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.