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

连接成功:

边栏推荐
- 面试测试工程师一般会问什么?测试主管告诉你
- MySQL 8.0.29 解压版安装教程(亲测有效)
- 21 Day Learning Challenge Schedule
- 2021年软件测试面试题大全
- MySQL 游标
- Go language study notes - grpc serverclient protobuf Go language from scratch
- 行测不会概念
- 浏览器的onload事件
- navicat connects to MySQL and reports an error: 1045 - Access denied for user 'root'@'localhost' (using password YES)
- nacos注册中心
猜你喜欢

MySQL导入sql文件的三种方法

MySQL安装教程

51单片机外设篇:DS18B20

JDBC revisited

nacos注册中心
[email protected](使用passwordYES)"/>Navicat报错:1045 -拒绝访问用户[email protected](使用passwordYES)

2021年软件测试面试题大全

ERROR 1045 (28000) Access denied for user ‘root‘@‘localhost‘解决方法

【C语言】LeetCode26.删除有序数组中的重复项&&LeetCode88.合并两个有序数组

Install and use Google Chrome
随机推荐
The original question on the two sides of the automatic test of the byte beating (arranged according to the recording) is real and effective 26
navicat新建数据库
How Navicat Connects to MySQL
区块元素、内联元素(<div>元素、span元素)
C语言中i++和++i在循环中的差异性
21天学习挑战赛安排
关于web应用的目录结构
Mysql common commands
coredns介绍
"Digital reconstruction of the system, getting the CEO is the first step"
21 Day Learning Challenge Schedule
MYSQL 唯一约束
Review: image saturation calculation formula and image signal-to-noise (PSNR) ratio calculation formula
MySQL 8.0.29 设置和修改默认密码
MySQL 8.0.29 decompressed version installation tutorial (valid for personal testing)
Three methods of importing sql files in MySQL
mysql 存储过程详解
MySql copies data from one table to another table
Mysql return table
MySQL如何创建用户