# 安装配置

Debian 系列

## 风险指令禁用

The following steps showing how to disable and rename commands are examples. You should only choose to disable or rename the commands that make sense for you. You can review the full list of commands for yourself and determine how they might be misused at

## 类型

https://redis.io/topics/data-types-intro

Bit arrays (or simply bitmaps): it is possible, using special commands, to handle String values like an array of bits: you can set and clear individual bits, count all the bits set to 1, find the first set or unset bit, and so forth.

HyperLogLogs: this is a probabilistic data structure which is used in order to estimate the cardinality of a set. Don’t be scared, it is simpler than it seems… See later in the HyperLogLog section of this tutorial.

Streams: append-only collections of map-like entries that provide an abstract log data type. They are covered in depth in the Introduction to Redis Streams.

## 发布/订阅

https://redis.io/topics/pubsub

## 事务

https://redis.io/topics/transactions

? redis的事务 所以到底啥用,首先是和传统数据库的事务的意义不同

Redis commands can fail only if called with a wrong syntax (and the problem is not detectable during the command queueing), or against keys holding the wrong data type: this means that in practical terms a failing command is the result of a programming errors, and a kind of error that is very likely to be detected during development, and not in production.

Redis is internally simplified and faster because it does not need the ability to roll back.

## cheatsheet

benchmarks: https://redis.io/topics/benchmarks

redis-benchmark -h 127.0.0.1 -p 6379 -t set,lpush -n 10000 -q 咦 这玩意不需要权限？？？

# ref

https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04

https://redis.io/documentation