一、編譯安裝
1、下載官網(wǎng)源碼
wget http://download.redis.io/releases/redis-2.8.3.tar
2、解壓源碼包并安裝
tar xzf redis-2.8.3.tar.gz
cd redis-2.8.3
make
make之后,會出現(xiàn)一句提示: Hint: To run 'make test' is a good idea ;) 建議運行一下
make test
此時會出現(xiàn)一個報錯:You need 'tclsh8.5' in order to run the Redis test
方案一:
# yum install - y tcl
方案二:
tcl的官方網(wǎng)站http://www.tcl.tk下載8.5版本
#tar xvzf tcl8.5.12-src.tar.gz
#cd tcl8.5.13/unix/
# ./configure
# make make test
# make instal

屏幕快照 2016-03-15 15.32.51.png
3、配置文件及啟動
mkdir /usr/local/redis
cp redis.conf /etc/
cd src
cp redis-check-aof redis-cli redis-server redis-check-dump /usr/local/redis/
redis-server /etc/redis.conf #啟動redis服務(wù)

屏幕快照 2016-03-15 15.31.15.png
4、設(shè)置后臺運行redis
vim /etc/redis.conf
#daemonize no
改成
#daemonize yes
redis配置文件詳解:http://