一妓柜、編譯安裝
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之后瓢谢,會(huì)出現(xiàn)一句提示: Hint: To run 'make test' is a good idea ;) 建議運(yùn)行一下
make test
此時(shí)會(huì)出現(xiàn)一個(gè)報(bào)錯(cuò):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、配置文件及啟動(dòng)
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 #啟動(dòng)redis服務(wù)
屏幕快照 2016-03-15 15.31.15.png
4驮瞧、設(shè)置后臺(tái)運(yùn)行redis
vim /etc/redis.conf
#daemonize no
改成
#daemonize yes
redis配置文件詳解:http://