一、源码安装

1、进入官网:https://redis.io/download

2、使用wget下载源码包

wget https://download.redis.io/releases/redis-6.2.6.tar.gz


3、解压源码包

tar -zxvf redis-6.2.6.tar.gz


4、编译源文件
4.1、进入文件夹

4.2、执行编译

make

5、运行redis服务端

编译完成后进入src目录下
./redis-server 启动服务端


6、测试服务可用

运行redis客户端
./redis-cli 执行ping收到响应pong则表示服务正常开启


7、外部连接

使用telnet测试是否可连接,该工具win系统自带,没有自己去搜索怎么开启

-DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.
遗失对主机的连接。

遇到问题不要慌,看不懂没关系,翻译

-DENIED Redis运行在保护模式,因为启用了保护模式,没有指定绑定地址,没有向客户端请求认证密码。 在这种模式下,只接受来自loopback接口的连接。 如果你想从外部计算机连接到Redis,你可以采用以下解决方案之一:
1)只要禁用保护模式发送命令’CONFIG SET保护模式no’从环回接口连接到Redis从同一主机服务器运行,但确保Redis不是公开访问互联网,如果你这样做。 使用CONFIG REWRITE使此更改永久生效。
2)或者,你可以通过编辑Redis配置文件,将保护模式选项设置为“no”,然后重新启动服务器来禁用保护模式。
3)如果你手动启动服务器只是为了测试,用“——protected-mode no”选项重新启动它。
4)设置绑定地址或认证密码。 注意:您只需要执行上述操作之一,服务器就可以开始接受来自外部的连接。

机译结果原因如上所示,就是redis开启了保护模式,官方给了四种解决方案,如果不知道怎么操作,小问题,首先打开你的浏览器

然后解决掉问题(10分钟内无法解决的,劝退一波,推荐回家养猪)

开个玩笑,不喜勿喷,不能说明不够聪明,只是说明注意力不够专注

二、docker安装

1、查找镜像docker search redis

[root@VM-8-4-centos src]# docker search redis
INDEX       NAME                                       DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/redis                            Redis is an open source key-value store th...   10193     [OK]
docker.io   docker.io/sameersbn/redis                                                                  83                   [OK]
docker.io   docker.io/grokzen/redis-cluster            Redis cluster 3.0, 3.2, 4.0, 5.0, 6.0, 6.2      80
docker.io   docker.io/rediscommander/redis-commander   Alpine image for redis-commander - Redis m...   70                   [OK]
docker.io   docker.io/redislabs/redisearch             Redis With the RedisSearch module pre-load...   41
docker.io   docker.io/redislabs/redisinsight           RedisInsight - The GUI for Redis                35
docker.io   docker.io/kubeguide/redis-master           redis-master with "Hello World!"                33
docker.io   docker.io/oliver006/redis_exporter          Prometheus Exporter for Redis Metrics. Su...   31
docker.io   docker.io/redislabs/redis                  Clustered in-memory database engine compat...   31
docker.io   docker.io/redislabs/rejson                 RedisJSON - Enhanced JSON data type proces...   31
docker.io   docker.io/arm32v7/redis                    Redis is an open source key-value store th...   25
docker.io   docker.io/arm64v8/redis                    Redis is an open source key-value store th...   19
docker.io   docker.io/redislabs/redisgraph             A graph database module for Redis               17                   [OK]
docker.io   docker.io/redislabs/rebloom                A probablistic datatypes module for Redis       16                   [OK]
docker.io   docker.io/redislabs/redismod               An automated build of redismod - latest Re...   15                   [OK]
docker.io   docker.io/webhippie/redis                  Docker image for redis                          11                   [OK]
docker.io   docker.io/insready/redis-stat              Docker image for the real-time Redis monit...   10                   [OK]
docker.io   docker.io/redislabs/redistimeseries        A time series database module for Redis         10
docker.io   docker.io/s7anley/redis-sentinel-docker    Redis Sentinel                                  10                   [OK]
docker.io   docker.io/goodsmileduck/redis-cli          redis-cli on alpine                             9                    [OK]
docker.io   docker.io/centos/redis-32-centos7          Redis in-memory data structure store, used...   6
docker.io   docker.io/clearlinux/redis                 Redis key-value data structure server with...   3
docker.io   docker.io/tiredofit/redis                  Redis Server w/ Zabbix monitoring and S6 O...   1                    [OK]
docker.io   docker.io/wodby/redis                      Redis container image with orchestration        1                    [OK]
docker.io   docker.io/xetamus/redis-resource           forked redis-resource                           0                    [OK]

2、拉取镜像docker pull docker.io/redis

[root@VM-8-4-centos src]# docker pull docker.io/redis
Using default tag: latest
Trying to pull repository docker.io/library/redis ...
latest: Pulling from docker.io/library/redis
eff15d958d66: Pull complete
1aca8391092b: Pull complete
06e460b3ba1b: Pull complete
def49df025c0: Pull complete
646c72a19e83: Pull complete
db2c789841df: Pull complete
Digest: sha256:619af14d3a95c30759a1978da1b2ce375504f1af70ff9eea2a8e35febc45d747
Status: Downloaded newer image for docker.io/redis:latest
[root@VM-8-4-centos src]# docker run -h
flag needs an argument: 'h' in -h
See 'docker run --help'.
You have new mail in /var/spool/mail/root

3、查看镜像docker images

[root@VM-8-4-centos src]# docker images
REPOSITORY                            TAG                 IMAGE ID            CREATED             SIZE
docker.io/redis                       latest              40c68ed3a4d2        5 days ago          113 MB
docker.io/sonatype/nexus3             latest              a0d390a200d2        3 months ago        655 MB
docker.io/minio/minio                 latest              fa62c6bd01a1        5 months ago        264 MB
docker.io/onlyoffice/documentserver   latest              30594f63d46c        6 months ago        2.57 GB

4、运行镜像docker run -p 6379:6379 -d --name redis3 40c68ed3a4d2

[root@VM-8-4-centos src]# docker run -p 6379:6379 -d --name redis 40c68ed3a4d2
4bbee5a0075ac958274a06928b8671279f03a5a6893ac8268e8ff98961800d59

看完再不会装,真的可以回去养猪了,这次不开玩笑

redis安装(保姆级别)相关推荐

  1. ROS安装--保姆级别教程(干货)

    @ROS(安装ROS) 1.2 安装 ROS 本小节介绍ROS的安装过程,参考链接:http://wiki.ros.org/cn/melodic/Installation 1.2.1 安装环境 ROS ...

  2. linux安装Redis保姆级别

    本篇文章是基于CentOS7,安装Redis版本为redis-6.2.6. 一.下载并解压Redis 1.执行下面的命令下载redis: wget https://download.redis.io/ ...

  3. Windows 10电脑使用VMware虚拟机安装macOS苹果系统[一站式保姆级别教程]

    indows系统下使用VMware虚拟机安装macOS苹果系统保姆级别教程,根据本教程操作可以轻松实现win系统安装macOS Mojav 10.14.macOS Catalina 10.15.mac ...

  4. Redis学习笔记,保姆级别!!学不会你打我!

    其中资料参考:Redis官网文档.百度百科.狂神说.陈哈哈的博客 文章目录 Redis概述 Window安装 Linux安装 测试性能 基础的知识 五大数据类型 String(字符串) List(列表 ...

  5. Redis安装教程(保姆级教程)

    Redis安装教程(保姆级教程) 一.Redis是什么? REmote DIctionary Server(Redis) 是一个由 Salvatore Sanfilippo 写的 key-value ...

  6. Prometheus+Node_exporter+Grafana监控(附送保姆级别linux安装攻略)

    Prometheus+Node_exporter+Grafana监控(附送保姆级别linux安装攻略) 前言:监控系统技术选型 从开发语言上看,为了应对高并发和快速迭代的需求,监控系统的开发语言已经慢 ...

  7. 保姆级别 附带源码 Django集成channels(一)实现简单聊天功能

    目录 前言 不想看我瞎BB可以直接跳到这里 1.WebSocket 1.1 ajax轮询 1.2 long poll 1.3 Websocket 2.Channels 2.1 WSGI 2.2 ASG ...

  8. 【转】Redis安装整理(window平台和Linux平台)

    原文连接:http://zheng12tian.iteye.com/blog/1471726 原文作者:zheng12tian 转载注明以上信息! window平台Redis安装 redis wind ...

  9. Redis安装和使用指南

    From: http://mwt198668.blog.163.com/blog/static/48803692201132141755962/ Redis安装指南 作者:Red_Ant 时间:201 ...

最新文章

  1. 让Windows Server 2008+IIS 7+ASP.NET突破默认限制,支持海量并发连接数
  2. ASP.NET Core 2.0 : 图说管道,唐僧扫塔的故事
  3. broker可以禁用吗 time_Win8.1系统Runtime Broker是什么进程?可以禁用吗?
  4. 【POJ - 2253】Frogger(floyd,或 部分瓶颈生成树的最大边)
  5. Linux shell的条件判断、循环语句及实例
  6. 选择 Mac 的 15 个充分理由
  7. 计算机中单位换算,计算机常用单位换算
  8. 第三节:原生数据类型使用陷阱 Pitfall of Primitive Data Type
  9. JavaScript高级程序设计读书笔记(第6章面向对象的程序设计之创建对象)
  10. 2022年山东省安全员A证特种作业证考试题库模拟考试平台操作
  11. C#、winfrom设置金额数字大小写转换
  12. 快讯 | Elon Musk拟跨界做喜剧,号称要建立跨星系传媒帝国Thud!(轰!)
  13. 华硕eeepc 1201N 开启AHCI
  14. 【推荐收藏】平面设计要求之印刷输出注意事项
  15. Cadence网表算法
  16. 【面试】面试之哒哒英语
  17. c语言如何实现正负交替输出指令,C语言的谜题
  18. 【分布式】一致性哈希和哈希槽
  19. SSO(单点登录)介绍
  20. python语句分隔用什么符号表示_python语句用什么符号隔开

热门文章

  1. 微信小程序实现蓝牙打印(图片、二维码、文字)
  2. 华为手机怎么隐藏按键图标_原来华为手机右上角隐藏扫描仪!纸质档一键电子化,真的涨知识了...
  3. netstat 的各个 state 什么意思
  4. spry使用视频_Spry Fox如何利用Cloud Build
  5. 【C语言基础-」TurboC环境】-」bioskey函数详细分析
  6. 如何在Linux上查看历史命令
  7. 艾美捷RPMI-1640培养基含L-谷氨酰胺的功能和研究
  8. 自学实前后端践项目2 phone Store 1
  9. Python 函数代码示例
  10. 输入netsh winsock reset 重启电脑生效