CentOS7 上 Redis 安装与使用

0x00 安装 源文件安装(推荐安装) 1. 在 CentOS 和 Red Hat 系统中,首先添加 EPEL 仓库,然后更新 yum 源 2. 安装 Redis 数据库 3. 安装好...

0x00 安装

源文件安装(推荐安装)

  1. 在 CentOS 和 Red Hat 系统中,首先添加 EPEL 仓库,然后更新 yum 源

    $ sudo yum install epel-release
    $ sudo yum update
    
    
  2. 安装 Redis 数据库

    $ sudo yum -y install redis
    
    
  3. 安装好后启动 Redis 服务

    # 部分情况需要启动redis后才能在 /etc/ 目录下找到 redis.conf 文件
    $ sudo systemctl start redis
    
    
  4. 配置 Redis 远程连接及密码

    $ vim /etc/redis.conf
    ## 注释掉 bind 127.0.0.1 允许远程访问redis
    #bind 127.0.0.1
    
    ## 解除 requirepass foobared 注释并将 foobared 修改为自己的密码
    requirepass `password`
    
    

0x01 图形化客户端连接测试

AnotherRedisDesktopManager: https://github.com/qishibo/AnotherRedisDesktopManager

https://oss.j3dream.top//img/20210623093833.png@img.blog