1.到官网上下载https://redis.io/download
安装步骤:
$ wget http://download.redis.io/releases/redis-4.0.2.tar.gz
$ tar xzf redis-4.0.2.tar.gz
$ cd redis-4.0.2
$ make
但是安装过程出现了一些问题:
(1)make[3]: gcc: Command not found
解决:这是由于新安装的Linux系统没有安装gcc环境,需要安装gcc
# yum install gcc
(2)zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
解决:make后面加上参数MALLOC=libc
# make MALLOC=libc
(3)You need tcl 8.5 or newer in order to run the Redis test
解决:yum安装tcl8.5(或去tcl的官方网站http://www.tcl.tk/下载8.5或更新的版本)
# yum install tcl