Introduction and installation of Redis

Source: Internet
Author: User
Tags redis server

1 Redis Introduction and Installation

What is 1.1 Redis?

REmote DIctionary Server (Redis) is a Key-value storage system written by Salvatore Sanfilippo.

First you need to understand some of the data structures of Redis, including lists, sets, ordered sets, and hashes.

Redis is often referred to as a data structure server (data structure server). The key value for Redis can include a string (strings) type, and it also includes data types such as hashes (hashes), lists (lists), collections (sets), and ordered collections (sorted sets).

For these data types, you can perform atomic operations. For example: attaching an operation to a string (append), incrementing a value in a hash, adding an element to a list, calculating the intersection of a set, a set and a difference set, and so on.

Advantages of 1.2 Redis

Very high performance –redis can support more than 100k+ per second read and write frequency.

Rich data types –redis support binary case Strings, Lists, hashes, sets and Ordered sets data type operations.

All atomic –redis operations are atomic, and Redis supports atomic execution of several operations.

Rich features –redis also supports publish/subscribe, notifications, key expiration, and more.

2 Redis Installation

Set Root password

$ sudo passwd (enter Shiyanlou user password and set root password) $ SU (enter root password, enter root permission) $ cd$ wget http://labfile.oss.aliyuncs.com/files0422/ redis-2.8.9.tar.gz$ tar xvfz redis-2.8.9.tar.gz$ cd redis-2.8.9$ make$ make install$ make test

After the Redis installation is complete, note some important files that can be viewed with the LS command. Server: Src/redis-server, client: src/redis-cls, default profile: redis.conf

The executable file is placed in the $path environment directory, which makes it easy to execute the program at a later time without entering the full path.

$ CP redis-server/usr/local/bin/$ CP redis-cli/usr/local/bin/

Start Redis Server

$ redis-server

View Redis

$ PS-EF | grep Redis

View Redit Service Status

# check Redis server Status by starting command $ netstat-nlt|grep 6379

Start Redis-client

$ su    (enter root password, enter root directory) $ cd$ redis-cli

  

Reference documents

Http://www.linuxidc.com/Linux/2014-05/101544p2.htm

Introduction and installation of Redis

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.