Redis Learning Notes and Summary 1 installation deployment

Source: Internet
Author: User

NoSQL Usage Scenarios:

1. High concurrency for data read and write

2. Efficient storage and access to massive amounts of data

3. High scalability and high availability of data

Redis is often referred to as a data structure server because keys can contain strings (strings), hashes (hashes), linked lists (lists), collections (sets), and ordered collections (sorted sets).

Linked lists can be made into stacks (advanced back-out) and Queues (FIFO).

Redis and MySQL

Redis Use cases:

1. Take the latest n data operation;

2. Leaderboard application, take top operation;

3. Need to accurately set the expiration time of the application;

4. Counter Application;

5.Uniq operation, get all data in a certain period of time the value of the row;

6. Real-time system, anti-spam system;

7.pub/sub Building a real-time messaging system; (Redis unique publish and subscribe)

8. Build the queue system;

9. Caching

Installation of Redis:

Redis official: Http://redis.io/download

Download stable version 2.8.19

① Copy the redis-2.8.19.tar.gz to/root.

② Decompression

TAR-ZXVF redis-2.8.19.tar.gz

③ Enter Directory redis-2.8.19

CD redis-2.8.19

④ compilation (No./configure configuration)

Make

⑤ Installation

CD src && make install

Installation is complete.

⑥ for ease of administration, move the following files:

mkdir -p/usr/local/redis/bin    #存放命令 mkdir -p/usr/local/redis/etc  /root /redis-2.8.19/redis.conf/usr/local/redis//root/redis-2.8.19/srcmv mkreleasehdr. Sh Redis-benchmark redis-check-aof redis-check-dump redis-cli redis-server  /usr/local/redis/bin

⑦ starting the Redis service (run-time pinned profile)

/usr/local/redis/bin/redis-server/usr/local/redis/etc/redis.conf

Redis Service Default port number: 6379

By default, Redis is not running in the background and requires the background operation of Redis to be turned on:

Vi/usr/local/redis/etc/redis.conf

Change the value of Daemonize to Yes (37 rows)

To see if Redis starts:

Ps-ef | grep Redis

To see if Port 6379 is occupied:

6379

⑧ Client Connections

/usr/local/redis/bin/redis-cli

To exit the client:

Quit or exit

⑨ Stop Redis

/usr/local/redis/bin/redis-CLI shutdown or pkill redis-server

There are no programs that occupy Port 6379.

Configuration of Redis

Redis Learning Notes and Summary 1 installation deployment

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.