Redis installation test and common method use tutorial

Source: Internet
Author: User
Tags redis

Redis is a high-performance key-value database. The emergence of Redis, to a large extent, compensates for the shortage of such key/value 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.

Performance Test Results:
Set operation 110,000 times per second, get operation 81,000 times per second, server configuration is as follows:

The code is as follows Copy Code

$ wget http://redis.googlecode.com/files/redis-2.6.7.tar.gz
$ tar xzf redis-2.6.7.tar.gz
$ CD redis-2.6.7
$ make

If the error is as follows, make is not found because it is possible that the server version of Linux is a minimal installation and many tools are not installed

The code is as follows Copy Code

-bash:make:command not found

CentOS execution

The code is as follows Copy Code

Yum Install make

If you can't find wget,

The code is as follows Copy Code


-bash:wget:command not found

CentOS execution

The code is as follows Copy Code

Yum Install wget

Start the server

The code is as follows Copy Code

$ src/redis-server

Start Display:


Client use

  code is as follows copy code

$ src/ REDIS-CLI
redis> set foo bar
OK
redis> get foo
"bar"

Related Article

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.