一、Redis 安装

wget http://download.redis.io/releases/redis-3.0.6.tar.gz
tar xzf redis-3.0.6.tar.gz
cp -a redis-3.0.6 /usr/local/
cd redis-3.0.6
make

二、配置:

ln -s /usr/local/redis-3.0.6/src/redis-server /etc/init.d/redis-service
ln -s /usr/local/redis-3.0.6/redis.conf /etc/redis.conf
ln -s /usr/local/redis-3.0.6/src/redis-cli /usr/bin/redis-cli

三、设置别名:

vim ~/.bashrc
alias redis=' /usr/bin/redis-cli $@'
source ~/.bashrc

四、设置开机启动:

vim /etc/rc.d/rc.local
/etc/init.d/redis-service /etc/redis.conf &

五、/etc/redis.conf 参数配置优化