当前位置:网站首页>【解决】RESP.app 连接不上redis
【解决】RESP.app 连接不上redis
2022-08-02 05:07:00 【OMUQUK】
一,查看linux的防火墙端口是否开启
可以使用 firewall-cmd --zone=public --list-ports 查询开放了哪些防火墙端口
firewall-cmd --zone=public --list-ports

一,开启端口号
开启6379端口号
firewall-cmd --zone=public --add-port=6379/tcp --permanent刷新(重新加载端口号)
firewall-cmd --reload查看6379端口号是否已经开启
firewall-cmd --query-port=6379/tcp
编辑防火墙配置文件:
vim etc/sysconfig/iptables-config
添加如下:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 6379 -j ACCEPT
重启redis:
redis-server redis.windows.conf
二,redis配置文件:
1.bind 127.0.0.1 修改为 bind 0.0.0.0
127.0.0.1 表示只允许本地访问,无法远程连接
0.0.0.0 表示任何ip都可以访问
2.protected-mode yes 改为 protected-mode no
yes 保护模式,只允许本地链接
no 保护模式关闭
3.daemonize yes 改为 daemonize no
yes: 代表开启守护进程模式。此时是单进程多线程的模式,redis将在后台运行。
no: 当前界面将进入redis的命令行界面,exit强制退出或者关闭连接工具都会导致redis进程退出
启动redis时显式指定redis.conf
启动redis时指定配置文件(redis.conf)
redis-server /etc/redis/6379.cong
三,RESP连接redis

连接成功:

边栏推荐
- Matlab论文插图绘制模板第41期—气泡图(bubblechart)
- Navicat如何连接MySQL
- swinIR论文阅读笔记
- What do interview test engineers usually ask?The test supervisor tells you
- MySQL 5.7 detailed download, installation and configuration tutorial
- Detailed explanation of mysql stored procedure
- MYSQL unique constraint
- 12 reasons for MySQL slow query
- Google Chrome(谷歌浏览器)安装使用
- mysql 查询表 所有字段
猜你喜欢
随机推荐
MYSQL unique constraint
高防服务器防御的原理是什么
对node工程进行压力测试与性能分析
复盘:图像饱和度计算公式和图像信噪(PSNR)比计算公式
ERROR 1045 (28000) Access denied for user 'root'@'localhost'Solution
Mysql return table
Timing task library in the language use Cron, rounding
165.比较版本号
coredns介绍
JUC(一)- JUC学习概览 - 对JUC有一个整体的认识
25K测试老鸟6年经验的面试心得,四种公司、四种问题…
51单片机外设篇:DS18B20
大屏UI设计-看这一篇就够了
navicat无法连接mysql超详细处理方法
classSR论文阅读笔记
18 years of programmer career, read more than 200 programming books, pick out some essence to share with you
mysql 8.0.28版本安装配置方法图文教程
MySql字符串拆分实现split功能(字段分割转列、转行)
interrupt()、interrupted()和isInterrupted()你真的懂了吗
golang generics









