Redis Quick Start

Source: Internet
Author: User

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

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.