Redis安裝與配置(學習筆記一)

sktj發表於2018-05-23

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 #是否持久化


相關文章