获取文件:
wget http://download.redis.io/redis-stable.tar.gz
解压文件:
tar xzvf redis-stable.tar.gz
进入目录:
cd redis-stable
make
make install
设置配置:
mkdir -p /etc/redis
cp redis.conf /etc/redis
修改配置:
vi /etc/redis/redis.conf
仅修改: daemonize yes
启动服务:
/usr/local/bin/redis-server /etc/redis/redis.conf
ps -ef | grep redis
使用客户端
redis-cli
set name dana
OK
get name
“dana”