当前位置:网站首页>【解决】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
连接成功:
边栏推荐
- Redis-集群模式(主从复制模式,哨兵模式,集群化模式)
- 测试技术之APP蓝牙连接测试
- Introduction to Grid Layout
- mysql实现按照自定义(指定顺序)排序
- go项目的打包部署
- Detailed installation and configuration of golang environment
- leetcode 665. Non-decreasing Array 非递减数列(中等)
- 100 latest software testing interview questions in 2022, summary of common interview questions and answers
- Navicat cannot connect to mysql super detailed processing method
- MySQL 5.7详细下载安装配置教程
猜你喜欢
Matlab论文插图绘制模板第41期—气泡图(bubblechart)
The company does not pay attention to software testing, and the new Ali P8 has written a test case writing specification for us
Android studio连接MySQL并完成简单的登录注册功能
测试技术之APP蓝牙连接测试
网安学习-内网渗透4
12个MySQL慢查询的原因分析
Packaging and deployment of go projects
c语言:查漏补缺(三)
MySQL如何创建用户
ELK log analysis system
随机推荐
MySQL 8.0.29 设置和修改默认密码
51单片机外设篇:点阵式LCD
MySQL 的 limit 分页查询及性能问题
高防服务器防御的原理是什么
Navicat报错:1045 -拒绝访问用户[email protected](使用passwordYES)
ERROR 1045 (28000) Access denied for user ‘root‘@‘localhost‘解决方法
MySQL 8.0.29 set and modify the default password
Mysql存储json格式数据
MySQL导入sql文件的三种方法
JUC(一)- JUC学习概览 - 对JUC有一个整体的认识
浏览器的onload事件
提高软件测试能力的方法有哪些?看完这篇文章让你提升一个档次
go语言中的goroutine(协程)
LeetCode刷题系列 -- 10. 正则表达式匹配
"Digital reconstruction of the system, getting the CEO is the first step"
测试环境要多少?从成本与效率说起
面试测试工程师一般会问什么?测试主管告诉你
golang的time包:时间间隔格式化和秒、毫秒、纳秒等时间戳格式输出的方法
MySQL implements sorting according to custom (specified order)
说好的女程序员做测试有优势?面试十几家,被面试官虐哭~~