当前位置:网站首页>【解决】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 字符串拼接 - 多种字符串拼接实战案例
- ApiPost is really fragrant and powerful, it's time to throw away Postman and Swagger
- Redis数据库
- Go语言中定时任务库Cron使用详解
- MySQL安装教程
- ELK日志分析系统
- Android studio connects to MySQL and completes simple login and registration functions
- 腾讯注册中心演进及性能优化实践
- 去字节跳动自动化测试二面原题(根据录音整理)真实有效 26
- MySQL导入sql文件的三种方法
猜你喜欢
随机推荐
MySQL 8.0.28 version installation and configuration method graphic tutorial
Review: image saturation calculation formula and image signal-to-noise (PSNR) ratio calculation formula
H5如何实现唤起APP
How much does a test environment cost? Start with cost and efficiency
leetcode 665. Non-decreasing Array 非递减数列(中等)
Redis-----非关系数据库
mysql 8.0.28版本安装配置方法图文教程
服务器的单机防御与集群防御
Brush LeetCode topic series - 10. Regular expression match
MySQL 5.7 detailed download, installation and configuration tutorial
Android Studio 实现登录注册-源代码 (连接MySql数据库)
非关系型数据库MongoDB的特点及安装
Matlab论文插图绘制模板第41期—气泡图(bubblechart)
简道云-灵活易用的应用搭建平台
Detailed explanation of mysql stored procedure
面试测试工程师一般会问什么?测试主管告诉你
C language: Check for omissions and fill in vacancies (3)
对node工程进行压力测试与性能分析
mysql 查询表 所有字段
el-input 只能输入整数(包括正数、负数、0)或者只能输入整数(包括正数、负数、0)和小数









