当前位置:网站首页>【解决】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

连接成功:

边栏推荐
- 25K测试老鸟6年经验的面试心得,四种公司、四种问题…
- coredns介绍
- el-input can only input integers (including positive numbers, negative numbers, 0) or only integers (including positive numbers, negative numbers, 0) and decimals
- 构造方法、成员变量、局部变量
- JDBC revisited
- Android studio connects to MySQL and completes simple login and registration functions
- 100 latest software testing interview questions in 2022, summary of common interview questions and answers
- golang泛型
- 区块元素、内联元素(<div>元素、span元素)
- 整合ssm(一)
猜你喜欢

21 Day Learning Challenge Schedule

mysql安装教程【安装版】

ApiPost 真香真强大,是时候丢掉 Postman、Swagger 了

MySQL 游标
![[Digital IC hand-tear code] Verilog fixed priority arbiter | topic | principle | design | simulation](/img/2b/15b3d831bba6aa772ad83f3ac91d23.png)
[Digital IC hand-tear code] Verilog fixed priority arbiter | topic | principle | design | simulation

Review: image saturation calculation formula and image signal-to-noise (PSNR) ratio calculation formula

navicat连接MySQL报错:1045 - Access denied for user ‘root‘@‘localhost‘ (using password YES)

MySql字符串拆分实现split功能(字段分割转列、转行)

Introduction and use of apifox (1).

Android Studio 实现登录注册-源代码 (连接MySql数据库)
随机推荐
服务器的单机防御与集群防御
51单片机外设篇:DS18B20
面试测试工程师一般会问什么?测试主管告诉你
行测不会概念
kubernetes 亲和、反亲和、污点、容忍
navicat connects to MySQL and reports an error: 1045 - Access denied for user 'root'@'localhost' (using password YES)
腾讯注册中心演进及性能优化实践
Mysql implements optimistic locking
golang's time package: methods for time interval formatting and output of timestamp formats such as seconds, milliseconds, and nanoseconds
classSR论文阅读笔记
Timing task library in the language use Cron, rounding
MySQL如何创建用户
Go语言中定时任务库Cron使用详解
mysql实现按照自定义(指定顺序)排序
Go语学习笔记 - 处理超时问题 - Context使用 从零开始Go语言
go语言中的goroutine(协程)
100 latest software testing interview questions in 2022, summary of common interview questions and answers
goroutine (coroutine) in go language
Redis数据库
navicat无法连接mysql超详细处理方法