安装
创建源码目录
1
2
3
| $ cd ~
$ mkdir src
$ cd src
|
安装 gcc 编译环境
1
| $ yum install -y wget gcc make tcl
|
下载rerdis
redis官网 https://redis.io/download
1
| $ wget http://download.redis.io/releases/redis-3.2.2.tar.gz
|
解压
1
| $ tar -zxvf redis-3.2.2.tar.gz
|
进入redis目录
编译
测试
测试过程报错
1
2
3
| [exception]: Executing test client: NOREPLICAS Not enough good slaves to write..
NOREPLICAS Not enough good slaves to write.
while executing
|
这种情况下,可以修改当前目录文件tests/integration/replication-2.tcl,将after 1000改为after 10000以延长等待时间 重新测试
安装
1
| $ make install PREFIX=/usr/local/redis
|
PREFIX安装指定目录 否则安装到/usr/local/bin里面了
启动redis服务
1
| $ ./redis-server ./redis-conf
|
我的博客