Address: http://laoding.me/2010/08/redis-quick-start.html
Redis is an advanced key-value database. It is similar to memcached, but data can be persistent and supports a wide range of data types. There are strings, linked lists, sets, and ordered sets. Allows you to compute, merge, and merge sets (difference) on the server side. It also supports multiple sorting functions. So redis can also be seen as a data structure server.
All redis data is stored in the memory and then asynchronously stored to the disk (this is called the "semi-persistent mode "); you can also write every data change to an append only file (AOF) (this is called "Full persistence mode ").
Download the latest version
Wget http://redis.googlecode.com/files/redis-2.0.0-rc4.tar.gz
Extract
Tar xvzf redis-2.0.0-rc4.tar.gz
Install C/C ++ compilation Components
Apt-Get install build-essential
Compile
CD redis-2.0.0-rc4make
Modify configuration file
/Etc/sysctl. conf
Add
VM. overcommit_memory = 1
Refresh configuration to make it take effect
Sysctl VM. overcommit_memory = 1
Start the service
./Redis-Server
Value assigned to start the command line Client
./Redis-cli set mykey somevalueok./redis-cli get mykeysomevalue./redis-cli lpush mylist firstvalueok
Everything is OK. You can understand the strength of redis.
End