Key-value database redis: 1. Installation and initial knowledge

Source: Internet
Author: User

Redis is a high-performance Key-value database. Because its read/write operations are performed in the memory, it can use up to 0.11 million set times per second and get more than 80 thousand times per second.

The installation process is listed below:

 

Installed on Ubuntu 10.4 desktop edition (although the official documentation also says you can add cywin to Windows for installation, but it has limited capabilities and has never been installed)

1. Get the installation package: the http://code.google.com/p/redis/downloads/list gets the installation package and uses the redis-1.02.tar.gz installation package,

 

2. Open "ApplicationProgram"->" Attachment "->" terminal ",

 

3. Enter the following command:

$ CD your redis directory
$ Tar xvzf redis- 1.02 .Tar.gz
$ CD redis- 1.02
$ Make

4. Test whether redis is successful. Run the following command to start the redis service.

$./Redis-Server

5. After the startup is successful, you can add and obtain data in the database. Example:

$./Redis-cli set mykey somevalue
OK
$./Redis-cli get Myke
Somevalue

You can also add and retrieve lists. For example:

Code $./Redis-cli lpush mylist firstvalue
OK
$./Redis-cli lpush mylist secondvalue
OK
$./Redis-cli lpush mylist thirdvalue
OK
$./Redis-cli lrange mylist 0 - 1
1 . Thirdvalue
2 . Secondvalue
3 . firstvalue

$. /redis-cli RPP mylist

firestvalue

$. /redis-cli lrange mylist 0 - 1
1 . thirdvlaue
2 . secondvalue

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.