当前位置:   article > 正文

RedisInsight在linux下的安装步骤及效果展示:专门用来监控redis数据_linux上部署redislnsight

linux上部署redislnsight


更多信息

  • 万能的后端。。。。
  • RedisInsight的作用:
  • Memory Overview 总览看用到了多少内存
  • Keyspace Summary 总共存了多少key值
  • Recommendations 峰值的qps有多少,网络峰值输出/输出各多少
  • Memory Analyzer
  • 分析效果展示
    在这里插入图片描述
  • 安装步骤:

1.Download RedisInsight

  • To use RedisInsight on your Linux machine, you can download from the RedisInsight page on the RedisLabs website:

  • Open this link to open up a form that allows you to select the operating system of your choice.
    在这里插入图片描述

  • Fill out the rest of the form and click “Download.” Please note that the package name is the combination of the platform and version as shown here:

  • redisinsight-linux64

2.Install RedisInsight

  • Open a terminal and navigate to the folder containing the downloaded file.

  • Make your downloaded file into an executable.

chmod +x redisinsight-linux64-<version>
  • 1
  • 配置

可以设置以下环境变量来配置RedisInsight:

  • REDISINSIGHT_PORT——默认情况下,RedisInsight监听端口8001。要将RedisInsight绑定到其它端口,请设置REDISINSIGHT_PORT环境变量。
  • REDISINSIGHT_HOST——默认情况下,RedisInsight绑定到IP地址0.0.0.0。要使RedisInsight绑定到其它主机,请设置REDISINSIGHT_HOST环境变量。
  • REDISINSIGHT_HOME_DIR——默认情况下,RedisInsight将应用程序数据(例如本地数据库、日志文件和快照文件)存储在机器主目录中的~/.redisinsight和Docker容器的/db目录中。要更改此目录,请设置REDISINSIGHT_HOME_DIR环境变量。
  • LOG_DIR——默认情况下,RedisInsight将日志文件存储在你的主目录(REDISINSIGHT_HOME_DIR)中。要让RedisInsight将日志文件存储在其它目录中,请设置LOG_DIR环境变量。修改REDISINSIGHT_HOST和REDISINSIGHT_HOME_DIR,若8001端口和其它应用端口冲突可自行修改。
export REDISINSIGHT_HOST=192.168.101.247
export REDISINSIGHT_HOME_DIR=/usr/local/redis-view/.redisinsight

  • 1
  • 2
  • 3
  • REDISINSIGHT_HOME_DIR也可不修改,默认会放在~/.redisinsight目录。
    注: 这样配置只会在当前Shell终端生效,可在~/.bash_profile中指定路径。
# 编辑或新增文件bash_profile 加入配置
pluma .bash_profile
export REDISINSIGHT_HOST=192.168.101.247
export REDISINSIGHT_HOME_DIR=/usr/local/redis-view/.redisinsight

# 使生效
source .bash_profile

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

3.Start RedisInsight

./redisinsight-linux64-version
  • 1
  • To access your RedisInsight GUI, open a web browser and navigate to http://127.0.0.1:8001.
  • 补充:环回地址换服务器本身的IP,也要保证8001不能被占用,可以看8001端口被谁监听
lsof -i:8001
  • 1
  • Congratulations! You have successfully installed RedisInsight and are now ready to inspect your Redis data, monitor database health, and perform runtime server configuration with this browser-based management interface for your Redis deployment.

在这里插入图片描述

4.Connect to Redis database

  • Assuming that you already have Redis database up and running, select “Connect to a Redis database”
    在这里插入图片描述
  • Enter the requested details, including Name, Host (endpoint), Port, and Password in the form, as shown below. You can skip username for now. Then click “ADD REDIS DATABASE”:
    在这里插入图片描述

5.Run the Redis CLI

  • Finally, although RedisInsight is a great GUI, sometimes you want to work directly in the command-line interface (CLI). To do so, click “CLI” in the menu on the left side of the RedisInsight UI:

在这里插入图片描述

  • Then paste the appropriate Redis commands in the command section, marked with “>>” as shown below, and press Enter.
    在这里插入图片描述
  • You can see the output displayed at the top of the screen. If it says “OK,” the command was executed successfully.

更多信息

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/601186
推荐阅读
相关标签
  

闽ICP备14008679号