Reputation: 3269
I'm trying to start a redis server with the support for tls. Based on the documentation (https://redis.io/topics/rediscli) I execute this command:
redis-cli -a xxxxxxxxx --tls --cacert ../config/certs/test-ca.crt
But it return this error:
Unrecognized option or bad number of args for: '--tls'
My redis-cli version is 6.0.9
I can't figure out what am I missing. How can I fix this?
Upvotes: 14
Views: 21822
Reputation: 397
Install dependencies
sudo apt update
sudo apt install -y build-essential pkg-config libssl-dev tcl libjemalloc-dev wget
Download and extract the redis-cli source file
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
Build with tls enabled
make distclean
make BUILD_TLS=yes
Once completed you can validate the build and connect to Redis-server
Redis-CLI -h localhost -p 6379 --tls
localhost:6379> INFO 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
Upvotes: 9
Reputation: 440
When you performed make of the redis, you should run as: make BUILD_TLS=yes
Upvotes: 26