Redis:修订间差异

来自牛奶河Wiki
跳到导航 跳到搜索
无编辑摘要
第31行: 第31行:
* wget https://redis.io/docs/latest/operate/rs/installing-upgrading/install/GPG-KEY-redislabs-packages.gpg
* wget https://redis.io/docs/latest/operate/rs/installing-upgrading/install/GPG-KEY-redislabs-packages.gpg
* gpg --import GPG-KEY-redislabs-packages.gpg
* gpg --import GPG-KEY-redislabs-packages.gpg
  <small><small><i>gpg: directory '/root/.gnupg' created
  <small><small><gpg: directory '/root/.gnupg' created
  gpg: keybox '/root/.gnupg/pubring.kbx' created
  gpg: keybox '/root/.gnupg/pubring.kbx' created
  gpg: /root/.gnupg/trustdb.gpg: trustdb created
  gpg: /root/.gnupg/trustdb.gpg: trustdb created
第38行: 第38行:
  gpg:              imported: 1</i></small></small>
  gpg:              imported: 1</i></small></small>
* dpkg-sig --verify redislabs_7.4.2-129~focal_amd64.deb
* dpkg-sig --verify redislabs_7.4.2-129~focal_amd64.deb
  <small><small><i>Processing redislabs_7.4.2-129~focal_amd64.deb...
  <small><small><Processing redislabs_7.4.2-129~focal_amd64.deb...
  GOODSIG _gpgorigin 5E8EFA2409E5C44FB529BE20EC5EC593D7D1529F 1712603737</i></small></small>
  GOODSIG _gpgorigin 5E8EFA2409E5C44FB529BE20EC5EC593D7D1529F 1712603737</i></small></small>
* install.sh
* install.sh
第45行: 第45行:
  redis-server
  redis-server


=== Passwd ===
=== Redis Shell ===
====可执行文件====
{| class="wikitable"
|可执行文件
|作用
|-
|redis-server
|启动redis
|-
|redis-cli
|redis命令行工具
|-
|redis-benchmark
|基准测试工具
|-
|redis-check-aof
|AOF持久化文件检测工具和修复工具
|-
|redis-check-dump
|RDB持久化文件检测工具和修复工具
|-
|redis-sentinel
|启动redis-sentinel
|}
 
==== redis-cli ====
redis-cli [-h {host} -p {port} {command}]
redis-cli -help
 
==== Passwd ====
  redis-cli  
  redis-cli  
  # 认证密码
  # 认证密码

2025年4月1日 (二) 13:32的版本

Redis(Remote Dictionary Server, 远程字典服务),是一个开源的使用 ANSI C 语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value 数据库。

Redis 的数据是存在内存中的,读写速度每秒可处理超过 10 万次读写操作。广泛应用在应用缓存领域,也经常用来做分布式锁。除此之外,Redis 支持事务、持久化、LUA 脚本、LRU 驱动事件、多种集群方案。

The open source, in-memory data store used by millions of developers as a database, cache, streaming engine, and message broker. Redis

License

2024 年 3 月 20 日,Redis 项目的开源协议发生了重大改变,从非常宽松的 BSD 转为 Redis 源代码可用许可证(RSALv2)和服务器端公共许可证(SSPLv1)下双重许可。在新的许可证下,托管云服务提供商不再被允许免费使用 Redis 的源代码。

Redis Stack

Redis Stack 扩展了 Redis OSS 的核心功能,更加专注于构建实时应用程序,并为调试等提供了完整的开发人员体验。

  • Redis Stack Server,包括:Redis,RedisSearch,RedisJSON,RedisGraph,RedisTimeSeries 和 RedisBloom等
  • RedisInsight
  • Redis Stack Client SDK

Install

Install Redis Stack

curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
apt-get update
apt-get install redis-stack-server
systemctl start redis-stack-server.service 
## 外网访问
# /etc/redis-stack.conf
bind * -::* 
protected-mode no

Install Redis Enterprise

<gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key EC5EC593D7D1529F: public key "Redis Labs Package Signing Key (2020) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
  • dpkg-sig --verify redislabs_7.4.2-129~focal_amd64.deb
<Processing redislabs_7.4.2-129~focal_amd64.deb...
GOODSIG _gpgorigin 5E8EFA2409E5C44FB529BE20EC5EC593D7D1529F 1712603737
  • install.sh
  • start
# /opt/redislabs/bin/
redis-server

Redis Shell

可执行文件

可执行文件 作用
redis-server 启动redis
redis-cli redis命令行工具
redis-benchmark 基准测试工具
redis-check-aof AOF持久化文件检测工具和修复工具
redis-check-dump RDB持久化文件检测工具和修复工具
redis-sentinel 启动redis-sentinel

redis-cli

redis-cli [-h {host} -p {port} {command}]
redis-cli -help

Passwd

redis-cli 
# 认证密码
auth "密码"
# 查看密码
config get requirepass
# 修改密码
config set requirepass "密码"