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" |