Redis installation (CentOS 7)

Source: Internet
Author: User
Tags download redis redis server

Redis's official website, Www.redis.io

1. Download Redis First:

wget http://download.redis.io/releases/redis-3.0.3.tar.gz

2. Unzip:

Tar xzf redis-3.0.3.tar.gz

3. Switch to the Redis directory and install

CD redis-3.0.3
Make

4. If an exception occurs, the workaround:

In general, when you execute the make command, you are prompted with an error, one of which is because GCC is not installed

4.1. Installing GCC

Yum-y Intall gcc-c++

4.2. Resolve error:jemalloc/jemalloc.h:no such file or directory

The specific error is as follows:

Zmalloc.h:50:31:error:jemalloc/jemalloc.h:no such file or directory

Zmalloc.h:55:2: Error: #error "Newer version of Jemalloc required"

MAKE[1]: * * * [ADLIST.O] Error 1
MAKE[1]: Leaving directory '/DATA0/SRC/REDIS-2.6.2/SRC '
Make: * * * [ALL] Error 2

Workaround: Add malloc=libc after the make command

Make malloc=libc

5. When the installation is complete, start the Redis-server

Enter the installation directory redis-3.0.3 in this directory you need to be aware that the Redis configuration file is redis.conf

In the entry to the SRC directory,

5.1. Start Redis Server

Redis-server

After you enter the command, the following appears:

5.2. Start the Redis client

Redis-cli

Small test:

Insert a value: SET Name Tommy

Query this value: GET Name

Results:

Redis installation (CentOS 7)

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.