CentOS 7 Installation Redis encountered some problems

Source: Internet
Author: User
Tags redis

First, make a list of installation steps:

1. Mount the installation package redis-3.0.6.tar.gz to the system root directory with WINSCP

2. Decompression: Tar zvxf redis-3.2.1.tar.gz

3. Access to directory: CD redis-3.2.1

4. Compile: Make

5. Enter src directory: cd src, compiling: Make install


Second, the problems encountered:

1. There are no GCC and gcc-c++ installed, the error is shown below:

Solution:

Yum install gcc
 yum install gcc-c++  
It is possible to install Tcl(if make test appears with the need TCL 8.5 or newer in order to run the Redis test)
Yum Install Tcl

2.ZMALLOC.H:50:31: Fatal error: jemalloc/jemalloc.h: no file or directory

Problem Reason:

There is this passage in the README.

Allocator---------Selecting a Non-default memory allocator when building Redis was done by setting the ' MALLOC '

environment variable. Redis is compiled and linked against libc malloc by default, with the exception of Jemalloc

Being the default on Linux systems. This default is picked because Jemalloc has proven to have fewer

Fragmentation problems than libc malloc. To force compiling against libc malloc, use:% make MALLOC=LIBC

To compile against Jemalloc in Mac OS X systems, use:% make Malloc=jemalloc


Say about allocator allocator, if have malloc this environment variable, will use this environment variable to build Redis. And libc is not the default allocator, the default is Jemalloc,

Because Jemalloc has been shown to have fewer fragmentation problems than libc. But if you do not have jemalloc and only libc of course make error.

So add such a parameter.


Workaround:

[Root@localhost src]# make MALLOC=LIBC



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.