报错1
ps:提示上图报错说明缺少gcc gcc-c++ libstdc++-devel
解决方法:
yum -y install gcc gcc-c++ libstdc++-devel
报错2
PS:查看README.md这样一段
Allocator
---------
Selecting a non-default memory allocator when building Redis is 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 was 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 on Mac OS X systems, use:
% make MALLOC=jemalloc
Redis是根据libc编译和链接的默认情况下是malloc,但是jemalloc是Linux上的默认值系统。选择此默认值是因为jemalloc的比libc malloc更容易出现碎片问题。我们需要强制编译libc malloc
[root@redis redis-5.0.8]# make MALLOC=libc