Linux 环境 Redis安装&Redis可视化工具RedisDesktopManager


一、Redis安装

1.1 Linux 源码安装

下载地址:http://redis.io/download,下载最新稳定版本。
Download, extract and compile Redis with:

$ wget https://download.redis.io/releases/redis-6.0.9.tar.gz
$ tar xzf redis-6.0.9.tar.gz
$ cd redis-6.0.9
$ make

The binaries that are now compiled are available in the src directory. Run Redis with:

$ src/redis-server
注意这种方式启动 redis 使用的是默认配置。
也可以通过启动参数告诉 redis 使用指定配置文件使用下面命令启动。
# cd src
# ./redis-server ../redis.conf

在这里插入图片描述
You can interact with Redis using the built-in client:

$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"
redis 127.0.0.1:6379> ping
PONG

以上说明我们已经成功安装了redis。

1.2 部分bug

**问:**Linux下安装redis常见错误 server.c:3318:16: error: ‘struct redisServer‘ has no member named ‘loading
在这里插入图片描述
:升级gcc

1:yum -y install centos-release-scl
2:yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
3:scl enable devtoolset-9 bash

二、Redis可视化工具RedisDesktopManager

2.1下载安装:

https://redisdesktop.com/download

github地址: https://github.com/uglide/RedisDesktopManager/releases
远程连接redis数据库配置

1.先检查服务器的安全组以及防火墙端口是否开放,默认6379
2.修改配置文件,redis一般运行在linux服务器上,以linux为例:
查找配置文件
# bind 127.0.0.1
  bind  0.0.0.0
# protected-mode yes
  protected-mode no

在这里插入图片描述
在这里插入图片描述
重新启动

./redis-server ../redis.conf
telnet 10.37.6.* 6379

在这里插入图片描述
在这里插入图片描述

扫描二维码关注公众号,回复: 12389896 查看本文章
查询:
 --查看是否设置了密码验证
     config get requirepass
 --设置密码
     config set requirepass zjb 
-- 查询用户名
     get name 
 --创建用户名:
     set name xiaoming

设置密码:requirepass 123456
在这里插入图片描述
在这里插入图片描述

2.2 部分bug

RedisDesktopManager远程连接失败的解决办法

telnet 10.37.6.* 6379

telnet不是内部或外部命令”;原因:Windows10系统环境下
答:
在这里插入图片描述
问: -DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients.在这里插入图片描述
答: 按上述配置


猜你喜欢

转载自blog.csdn.net/qq_35911309/article/details/111604342