[root@infa ~]# wget http://download.redis.io/releases/redis-2.8.12.tar.gz
tar xzf redis-2.8.12.tar.gz
[root@infa ~]# tar xzf redis-2.8.12.tar.gz
[root@infa ~]# cd redis-2.8.12
[root@infa redis-2.8.12]# ls
00-RELEASENOTES BUGS CONTRIBUTING COPYING deps INSTALL Makefile MANIFESTO README redis.conf runtest runtest-sentinel sentinel.conf src tests utils
[root@infa redis-2.8.12]# make
但是這樣子編譯會報錯,貌似是因為系統的原因;
報錯如下:
解決方法,就是加上編譯參數設置,如下:
[root@infa redis-2.8.12]# make CFLAGS="-march=i686"
編譯成功;
啟動並運行redis:
[root@infa redis-2.8.12]# src/redis-server
打開另外一個終端運行,redis客戶端
[root@infa redis-2.8.12]# src/redis-cli
127.0.0.1:6379> set name chenzhou
OK
127.0.0.1:6379> get name
"chenzhou"
127.0.0.1:6379>