Installation and testing of redis and usage instructions

Source: Internet
Author: User

Redis is a key-value storage system. Similar to Memcached, Memcached supports more storage value types, including string, list, set, and zset) and hashs (hash type), I will share with you the installation and testing of redis and common methods.

Redis is a high-performance key-value database. The emergence of redis largely compensates for the shortage of key/value storage such as memcached, and can play a good complementary role in relational databases in some cases. It provides Python, Ruby, Erlang, and PHP clients for ease of use.

Performance test results:
The SET operation is performed 110000 times per second, and the GET operation is performed 81000 times per second. The 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
$ Redis-2.6.7 cd
$ Make

If the following error is reported, make cannot be found because linux of the server version is the minimum 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 cannot connect to 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 usage

The Code is as follows: Copy code

$ Src/redis-cli
Redis> set foo bar
OK
Redis> get foo
"Bar"

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.