1.下载RedisDesktopManager

直接去官网上搜就行

官网地址:?RESP.app - GUI for Redis ? on the Mac?App?Store

2.安装RedisDesktopManager

傻瓜式安装,一直点next就行

安装完成后就是这样

redis 命令行连接 redismanager连接redis_redis 命令行连接

3.建立远程连接

开始连接之前需要以下准备工作

修改redis.conf文件 命令vim redis.conf

如果你的redis.conf在其他文件里面,需要加上文件路径

比如我的在etc目录下,就在redis前面加上/etc

vim /etc/redis.conf

redis 命令行连接 redismanager连接redis_数据库_02

1.设置虚拟机的主机ip/或者设置为0.0.0.0开放所有

我这里是直接注释掉了,然后使用ps -ef | grep redis命令查看

redis 命令行连接 redismanager连接redis_数据库_03

显示这个*就可以了

2.把protected-mode设置为no,关闭保护模式,才能远程连接

在redis.conf里面找到protected-mode并设置为no

如果在redis.conf直接找的话太慢了,在这里直接可以**/protected**实现快速查找

3.然后我们要把redis设置为后台启动,即将deamonize设置为yes

redis 命令行连接 redismanager连接redis_redis 命令行连接_04

4.记得要关闭防火墙

启动: systemctl start firewalld

查看状态: systemctl status firewalld

停止: systemctl disable firewalld

禁用: systemctl stop firewalld

然后就可以开始连接了

redis 命令行连接 redismanager连接redis_redis_05

可以先点左下角测试一下

redis 命令行连接 redismanager连接redis_jvm_06

然后就可以了

我在这里也踩了很多坑,弄了好长时间。希望大家都能沉下心来,去发现问题所在