linux安装redis-4.0.2

一、下载redis

cd /usr/local/src

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

二、解压

tar -zxvf redis-4.0.2.tar.gz

cd redis-4.0.2

三、编译安装

1、看看是否安装了gcc环境

rpm -qa|grep gcc

没有,则安装 

yum -y install gcc

make 

出现:

Hint: It's a good idea to run 'make test' ;)
错误信息
则运行 make test
make test
出现:
You need tcl 8.5 or newer in order to run the Redis test
make: *** [test] Error 1


,则需要安装tcl8.6.1

cd /usr/local/src/
wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
tar xzvf tcl8.6.1-src.tar.gz
cd /usr/local/src/tcl8.6.1/unix/
./configure
make && make install

cd /usr/localsrc/redis-4.0.2
make test

不报错,通过

make 安装成功


原文地址:https://www.cnblogs.com/sky-cheng/p/10614589.html