0

我想为我的服务器配置一个反向 HAProxy。我正在检查我的 HAProxy 的版本,我意识到它不像其他人那样显示信息构建 openssl。缺少的部分如下所示。我已经安装了 openssl,所以我在这里错过了哪些其他步骤?

 Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT 
 IP_FREEBIND
 Built with OpenSSL version : OpenSSL 1.0.2p  14 Aug 2018
 Running on OpenSSL version : OpenSSL 1.0.2p  14 Aug 2018

我的显示:haproxy -vv

 HA-Proxy version 1.8.13 2018/07/30
 Copyright 2000-2018 Willy Tarreau <willy@haproxy.org>

 Build options :
 TARGET  = linux2628
 CPU     = generic
 CC      = gcc
 CFLAGS  = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -fno-strict-overflow -Wno-unused-label
 OPTIONS =

Default settings :
maxconn = 2000, bufsize = 16384, maxrewrite = 1024, maxpollevents = 200

Built with network namespace support.
Built without compression support (neither USE_ZLIB nor USE_SLZ are set).
Compression algorithms supported : identity("identity")
Built without PCRE or PCRE2 support (using libc's regex instead)
Built with multi-threading support.
Encrypted password support via crypt(3): yes
Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT 
IP_FREEBIND

Available polling systems :
epoll : pref=300,  test result OK
poll : pref=200,  test result OK
select : pref=150,  test result OK
Total: 3 (3 usable), will use epoll.

Available filters :
    [TRACE] trace
    [COMP] compression
    [SPOE] spoe
4

1 回答 1

0

显然你缺少编译选项:

USE_OPENSSL=1 SSL_INC=/path/to/ssl/include SSL_LIB=/path/to/ssl/lib

我编译

make TARGET=linux2628 USE_OPENSSL=1 SSL_INC=/path/to/include SSL_LIB=/path/to/lib

我的构建选项看起来像这样

Build options :
  TARGET  = linxu2628
  CPU     = generic
  CC      = gcc
  CFLAGS  = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -fno-strict-overflow -Wno-unused-label
  OPTIONS = USE_POLL=default USE_OPENSSL=1

如果您看到 USE_OPENSSL=1,您应该会看到有关 openssl 版本的缺失部分

于 2018-12-06T10:26:48.050 回答