Linux安装 Redis 以及配置
发布日期:2021-05-10 23:41:54 浏览次数:12 分类:精选文章

本文共 3292 字,大约阅读时间需要 10 分钟。

Linux - ������ Redis ������������

������ Redis

��� Linux ��������� Redis ���������������������������������������������������������������������������������������������

  • ������ Redis ������

    ��������������������������������������������������������� Redis ��� YUM ������

    yum search redis

    ������������������ Redis ��������������������������� [Fedora ��� EPEL ������] ������������

    yum install epel-release
  • ������ Redis

    ������ YUM ������ Redis���

    yum install redis

    ������������������������������������������������ Redis ���������

    systemctl start redis

    ������ Redis ���������������

    systemctl status redis

    ������ Redis ���������

    ps -ef | grep redis
  • ������ Redis

    ������������������������ Redis ���������������������

    redis-cli

    ������������ Redis ���������������������������������������������

  • ���������������

    ������������ Redis ������������������������������������������������������������������������ 6379���

    # Centos 7 ������������������������������firewall-cmd --add-service=redis --permanentservice iptables save

    ������������������������������������������������

    #.Generic������iptables -I INPUT -p tcp --dport 6379 -j ACCEPTservice iptables save
  • Redis ������

    ��������������������������� Redis ������������������������������������������������

  • ������������

    Redis ������������������������������������������������������������������������������������������������������������������������������������

  • ������������������

    ������ Redis ������������������������������

    vi /etc/redis.conf

    ���������������������������������������������������������������������������

    • ��������������������������������������� port 6379������������������������
    • ��������������������������� requirepass ��������� foo ������������������������
  • ������������������

    ������������������������������������������������������������ Redis���

    redis-server /etc/redis.conf &
  • Redis ������������

    • ������������ Redis
      redis-cli -h 127.0.0.1 -p 6379
    • ������������������
      info
    • ** Diameter ������**
      shutdown

    ������ Redis Desktop Manager ������������ Redis

    ��������������������������������������������� Redis��������������� [Redis Desktop Manager] ���������������

  • ������������

    ��� Redis Desktop Manager ���������������������������

  • ������������

    • ������ Redis Desktop Manager������������������������+������������������New Connection������
    • ������������������������IP ���������������������������������������������������������������������������������
  • ������������

    ���������������������������������������������������:

    • ������ IP ������������������������������ 127.0.0.1 ������������
    • protected-mode ������������ yes��������������������� protected-mode no���

    ���������������

    vi /etc/redis.conf
    • ��������� bind 127.0.0.1 ������
    • ��� protected-mode yes ��������� protected-mode no���
    • ���������������
    service redis restart

    ������������������������������

  • Spring Boot ������ Redis

    ��� Spring Boot ��������������������� Redis���������������������������������������������

    Redis ������������������

    ���������������������������������������

    spring.redis.database=0spring.redis.host=localhostspring.redis.port=6379spring.redis.password/spring.redis.jedis.pool.max-active=20spring.redis.jedis.pool.max-wait=-1spring.redis.jedis.pool.max-idle=10spring.redis.jedis.pool.min-idle=0spring.redis.timeout=1000

    ������������������������������������������������������������������������������������

    上一篇:Linux持续集成-安装部署 jenkins
    下一篇:Linux分享 - 安装 MongoDB

    发表评论

    最新留言

    留言是一种美德,欢迎回访!
    [***.207.175.100]2025年04月28日 13时32分04秒