首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何查看redis实例版本?

如何查看redis实例版本?
EN

Stack Overflow用户
提问于 2014-02-04 23:03:04
回答 7查看 247.9K关注 0票数 220

如何检查Redis服务器版本?

我在Redis site中找到了这个命令:

服务器$redis-

这应该会给我(根据网站):

代码语言:javascript
复制
[28550] 01 Aug 19:29:28 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
[28550] 01 Aug 19:29:28 * Server started, Redis version 2.2.12
[28550] 01 Aug 19:29:28 * The server is now ready to accept connections on port 6379
... and so forth ...

但我得到的结果是:

代码语言:javascript
复制
[8719] 04 Feb 14:51:09.009 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[8719] 04 Feb 14:51:09.009 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
[8719] 04 Feb 14:51:09.009 # Creating Server TCP listening socket *:6379: bind: Address already in use

这意味着我需要配置它,但我想要的是版本!

那么如何检查Redis服务器的版本呢?

EN

回答 7

Stack Overflow用户

回答已采纳

发布于 2014-02-04 23:03:04

$redis-服务器--版本

为您提供版本。

票数 362
EN

Stack Overflow用户

发布于 2014-02-05 11:45:52

运行命令INFO。版本将是显示的第一个项目。

与redis-server --版本相比,这种方式的优点是有时您无法访问服务器(例如,当它在云上提供给您时),在这种情况下,INFO是您唯一的选择。

票数 207
EN

Stack Overflow用户

发布于 2020-06-22 19:31:47

为了支持上面给出的答案,可以通过以下方式获取redis实例的详细信息

代码语言:javascript
复制
$ redis-cli
$ INFO

这提供了您可能需要的所有信息

代码语言:javascript
复制
# Server
redis_version:5.0.5
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:da75abdfe06a50f8
redis_mode:standalone
os:Linux 5.3.0-51-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:7.5.0
process_id:14126
run_id:adfaeec5683d7381a2a175a2111f6159b6342830
tcp_port:6379
uptime_in_seconds:16860
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:15766886
executable:/tmp/redis-5.0.5/src/redis-server
config_file:

# Clients
connected_clients:22
....More Verbose

版本位于第二行:)

票数 29
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21555942

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档