1、安装
yum install -y gcc gcc-c++
make MALLOC=libc
wget http://download.redis.io/releases/redis-3.0.7.tar.gz
tar zxvf redis-3.0.7.tar.gz
mv redis-3.0.7 redis
cd redis
make&&make install
2、查看
redis-cli -v
3、启动6379
redis-server
redis-server --port 6380
redis-server /etc/redis.conf
4、客户端:
redis-cli -h 122.2.2.2 -p 6379
set hello world
get hello
redis-cli -h xx -p xx get hello
5、关闭:
redis-cli shutdown
redis-cli shutdown nosave|save #是否持久化