一、安装redis
官网地址: https://redis.io/
# 1、在线下载
# wget http://download.redis.io/releases/redis-4.0.8.tar.gz
# 2、解压
# tar xzf redis-4.0.8.tar.gz
# 3、编译
# cd redis-4.0.8
# make
可能遇见的错误:
...
make[3]: gcc: Command not found
...
/bin/sh: cc: command not found
原因:安装redis所需的依赖包缺少
# yum -y install gcc gcc-c++ libstdc++-devel
# make MALLOC=libc
安装成功后测试:make test
[root@localhost redis-4.0.8]# make test
cd src && make test
make[1]: Entering directory `/opt/redis-4.0.8/src'
You need tcl 8.5 or newer in order to run the Redis test
make[1]: *** [test] Error 1
make[1]: Leaving directory `/opt/redis-4