当前位置: 首页 > ai >正文

【Redis】Redis安装

Redis安装

apt install redis -y

修改 /etc/redis/redis.conf

  • 修改 bind 127.0.0.1bind 0.0.0.0
  • 修改 protected-mode yesprotected-mode no
1 # By default, if no "bind" configuration directive is specified, Redis listens
2 # for connections from all the network interfaces available on the server.
3 # It is possible to listen to just one or multiple selected interfaces using
4 # the "bind" configuration directive, followed by one or more IP addresses.
5 #
6 # Examples:
7 #
8 # bind 192.168.1.100 10.0.0.1
9 # bind 127.0.0.1 ::1
10 #
11 # ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
12 # internet, binding to all the interfaces is dangerous and will expose the
13 # instance to everybody on the internet. So by default we uncomment the
14 # following bind directive, that will force Redis to listen only into
15 # the IPv4 loopback interface address (this means Redis will be able to
16 # accept connections only from clients running into the same computer it
17 # is running).
18 #
19 # IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
20 # JUST COMMENT THE FOLLOWING LINE.
21 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 # bind 127.0.0.1   # 注释掉这行
23 bind 0.0.0.0     # 添加这行
24
25 protected-mode no # 把 yes 改成 no

控制 Redis 启动

启动 Redis 服务

service redis-server start

停止 Redis 服务

service redis-server stop

重启 Redis 服务

service redis-server restart 
http://www.xdnf.cn/news/9085.html

相关文章:

  • 红外遥控器接收实验:CubeMX配置底层软件
  • 基于vue框架的动漫网站noww0(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
  • 【windwos】文本编辑器Notepad++ 替代品Notepad--
  • 汇川伺服软件设置提示使能冲突
  • 深入解读Qwen3技术报告(五):后训练对齐
  • Linux系统调用深度剖析
  • 佳易王商品进出库管理系统:数字化库存管理的全能解决方案#海鲜蔬果批发管理#批发出库管理
  • 双臂机器人运动空间与干涉分析仿真技术报告
  • 功能“递归模式”在 C# 7.3 中不可用,请使用 8.0 或更高的语言版本的一种兼容处理方案
  • 【产品经理】如何撰写产品文档
  • 解锁webpack:处理跨域devserver、摇树treeshaking、图片压缩sharp
  • ACM模式中输入输出的处理
  • 硅基计划2.0 学习总结 肆 初稿
  • 深度学习---可视化
  • Linux wget 常用命令详解
  • AI时代新词-AI伦理(AI Ethics)
  • 【Linux】磁盘管理,虚拟机CentOS扩展根分区
  • 像造汽车一样造房子:装配式建筑4.0如何重塑未来人居
  • 启程:MCP开发环境配置和旅游攻略案例体验
  • 基于NSGA2算法的无人机航迹规划算法
  • BaseProviderMultiAdapter多布局总结
  • vertica优化
  • 网口XDP-报文回环转发
  • 知识图谱系列(3):构建方法与流程
  • vue3获取两个日期之间的所有时间
  • 解决leetcode第3509题.最大化交错和为K的子序列乘积
  • OceanBase数据库全面解析(高级特性篇)
  • Real2Render2Real:无需动力学仿真或机器人硬件即可扩展机器人数据
  • AI智能混剪核心技术解析(一):字幕与标题生成的三大支柱-字幕与标题生成-优雅草卓伊凡
  • 海思3519V200ARM Linux 下移植 Qt5.8.0