Redis Standalone build under Linux

Source: Internet
Author: User

1.1. What is Redis

Redis is an open-source high-performance key-value pair (Key-value) database developed in the C language. It adapts to the storage requirements of different scenarios by providing a variety of key-value data types, and the key data types supported by Redis so far are as follows:

String type

Hash type

List type

Collection type

The Ordered collection type.

Application Scenarios for 1.2.redis

Caching (data queries, short connections, news content, product content, and so on). (Maximum use)

Session separation in a distributed cluster architecture.

Chat room's online friends list.

Task queue. (Seconds to kill, snapping, 12306, etc.)

Apply Leaderboards.

Website Access statistics.

Data expiration processing (can be accurate to milliseconds)

1.3.redis stand-alone version installation

(1) Because Redis is developed using the C language, if you want to run on Linux, you need a gcc-c++ environment. Then we need to see if gcc-c++ is installed. If not, install the gcc-c++ environment on the virtual machine

First you need to see if you have the runtime environment on Linux, and the input command is: RPM-QA | grep gcc-c++

My Linux is loaded with this environment, the result of the input command is: gcc-c++-4.4.7-17.el6.i686

If there is no such environment on Linux, then you need to install the environment, and the following commands are installed on the network: Yum install gcc-c++

(2) Download the http://download.redis.io/releases/redis-3.2.11.tar.gz from the official website and copy the redis-3.2.11.tar.gz to the/user/local directory.

(3) Decompression Source: TAR-ZXVF redis-3.2.11.tar.gz

(4) Enter the extracted directory cd/usr/local/redis-3.2.11, and then compile: make

(5) Install to the specified directory make Prefix=/usr/local/redis install

(6) Copy the configuration file to the installation directory Cp/usr/local/redis-3.2.11/redis.conf/usr/local/redis/bin

1.4. Start Redis

(1), front-end mode startup

Run directly in the/usr/local/redis/bin directory./redis-server is the foreground startup, and Redis will close after the running window is closed, this method is not recommended, in order to close the window without turning off Redis, you need to use background boot.

(2), back-end mode start

Modify Redis.conf's daemonize No to Yes and execute directly under/usr/local/redis/bin directory./redis-server./redis.conf start Redis, execute. REDIS-CLI Access to Redis client

Redis Standalone builds under Linux

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.