gpt4 book ai didi

macos - 如何在 Mac 上使用 TLS 构建 Redis 6

转载 作者:行者123 更新时间:2023-12-03 06:36:17 25 4
gpt4 key购买 nike

我想在 Mac 上使用 TLS 和 Redis(macOS 10.15.4,内核:Darwin 19.4.0)。这是我根据 Documentation 尝试的:

export BUILD_TLS=yes
mkdir redis && cd redis
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
cd redis-stable
make BUILD_TLS=yes
make test
sudo make install

所有测试都通过了,但是当我运行时:
% redis-server --tls-cluster yes

我得到错误:
*** FATAL CONFIG FILE ERROR (Redis 6.0.4) *** Reading the configuration file, at line 2
>>> 'tls-cluster "yes"'
Bad directive or wrong number of arguments

最佳答案

试试看 brew install redis (当前版本为 6.0.5 )它已经包含对 TLS 的支持,无论如何,如果您想从源代码编译它,您可以检查 brew 公式:https://github.com/Homebrew/homebrew-core/blob/master/Formula/redis.rb#L18

def install
system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "BUILD_TLS=yes"

%w[run db/redis log].each { |p| (var/p).mkpath }

# Fix up default conf file to match our paths
inreplace "redis.conf" do |s|
s.gsub! "/var/run/redis.pid", var/"run/redis.pid"
s.gsub! "dir ./", "dir #{var}/db/redis/"
s.sub! /^bind .*$/, "bind 127.0.0.1 ::1"
end

etc.install "redis.conf"
etc.install "sentinel.conf" => "redis-sentinel.conf"
end

关于macos - 如何在 Mac 上使用 TLS 构建 Redis 6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62257433/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com