这里重点是Redis的安装 CentOS的不在赘述
下载Redis
官网 | 中文网 下载
网站首页找到download点一下即可
也可以直接 wget http://download.redis.io/releases/redis-2.8.17.tar.gz
下载
下载后会有一个 redis-4.0.9.tar.gz
文件
使用 tar -xvzf
即可解压 出 redis-4.0.9
文件夹
安装
进入 解压后的文件夹
cd redis-4.0.9
执行 make
命令
此时可能会报错 没有 gcc编译器
yum install gcc-c++
安装一下即可
之后 make
和 make install
[root@localhost redis-4.0.9]# make install
cd src && make install
make[1]: Entering directory `/opt/redis-4.0.9/src'
Hint: It's a good idea to run 'make test' ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
make[1]: Leaving directory `/opt/redis-4.0.9/src'
安装成功
上面提示执行 make test , 可以不用执行 , 因为如果想要执行 会提示
You need tcl 8.5 or newer in order to run the Redis test
需要安装 tcl , 懒…..
刚学习 Redis , 如有不正确的地方, 欢迎评论区指出来 , 非常感谢!!!!