下載2.8.17版本
$ wget http://download.redis.io/releases/redis-2.8.17.tar.gz
$ tar xzf redis-2.8.17.tar.gz
$ cd redis-2.8.17
make
$ yum -y install gcc automake autoconf libtool make #【也許在make以前要先安裝GCC】
$ make MALLOC=libc
構造redis目錄、複製文件
$ mkdir -p ../redis_single/src
$ cp runtest runtest-sentinel redis.conf sentinel.conf ../redis_single/
$ cd src/
$ cp redis-benchmark redis-check-aof redis-check-dump redis-cli redis-sentinel redis-server ../../redis_single/src/
$ ../../redis_single/src/
$ vim ../redis.conf
編輯配置
# 後臺啓動
daemonize yes
# 設置密碼
requirepass 123456
# pid
pidfile /opt/development/redis_single/redis.pid
啓動redis
$ ./redis-server ../redis.conf
客戶端測試
$ ./redis-cli -p 6379 -a 123456
> SET name Evan
> GET name
"Evan"
> SHUTDOWN
> exit