yum安装Redis

阅读 65

2023-07-26

安装remi存储库

非必要,主要为了安装高版本

yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
-- 使用清华软件源:
yum install https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rp

安装Redis

yum install -y redis 

-- remi 存储库
yum --enablerepo=remi install redis -y

测试登录

systemctl start redis

redis-cil -p 6379

远程登录

修改后重启

vim /etc/redis.conf

# 添加
bind 0.0.0.0
# 注释
bind 127.0.0.1

redis-cli -h 192.168.1.99

测试使用命令

set key "hello world"

get key

精彩评论(0)

0 0 举报