我正在尝试启动一个支持 tls 的 redis 服务器。根据文档(https://redis.io/topics/rediscli),我执行以下命令:
redis-cli -a xxxxxxxxx --tls --cacert ../config/certs/test-ca.crt
但它返回此错误:
无法识别的选项或错误数量的参数:“--tls”
我的 redis-cli 版本是 6.0.9
我无法弄清楚我错过了什么。我怎样才能解决这个问题?
安装依赖项
sudo apt update
Run Code Online (Sandbox Code Playgroud)
sudo apt install -y build-essential pkg-config libssl-dev tcl libjemalloc-dev wget
Download and extract the redis-cli source file
Run Code Online (Sandbox Code Playgroud)
wget http://download.redis.io/redis-stable.tar.gz
Run Code Online (Sandbox Code Playgroud)
tar xvzf redis-stable.tar.gz
Run Code Online (Sandbox Code Playgroud)
cd redis-stable
Run Code Online (Sandbox Code Playgroud)
启用 tls 进行构建
make distclean
Run Code Online (Sandbox Code Playgroud)
make BUILD_TLS=yes
Once completed you can validate the build and connect to Redis-server
Run Code Online (Sandbox Code Playgroud)
Redis-CLI -h localhost -p 6379 --tls
Run Code Online (Sandbox Code Playgroud)
本地主机:6379> 信息 SSL
ssl_enabled:yes
ssl_current_certificate_not_before_date:Jul 27 00:00:00 2021 GMT
ssl_current_certificate_not_after_date:Aug 25 23:59:59 2022 GMT
ssl_current_certificate_serial:ABCDEFGKKSHDJKAHSD05A15BF008A57002E8
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1724 次 |
| 最近记录: |