查看Redis版本的2种方式

查看Redis版本的2种方式

  • 使用 redis-server 命令
    
    进入Redis目录输入如下命令:
    redis-server --version

    或者

    redis-server -v
    
    Redis server v=5.0.4 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=7f97b78fea10ae2e

     

  • 使用 info 命令

    先连接进入redis后,输入info

    "# Server
    redis_version:5.0.4
    redis_git_sha1:00000000
    redis_git_dirty:0
    redis_build_id:7f97b78fea10ae2e
    redis_mode:standalone
    os:Linux 3.10.0-1062.9.1.el7.x86_64 x86_64
    arch_bits:64
    multiplexing_api:epoll
    atomicvar_api:atomic-builtin
    gcc_version:4.8.5
    process_id:1748
    run_id:04f4cc60e094364caee36a10b0114a058f7d1e00
    tcp_port:16308
    uptime_in_seconds:10017429
    uptime_in_days:115
    hz:10
    configured_hz:10
    lru_clock:3343620
    executable:/usr/local/redis/bin/redis-server
    config_file:/usr/local/redis/bin/redis.conf
    
    ...
    "