2012-10-02 29 views
4

我試圖將新的haproxy與ssl(1.5-dev12)結合使用。但是我有這個新功能的錯誤。使用SSL的Haproxy不起作用

我已經安裝了:

make TARGET=linux2632 USE_OPENSSL=yes 
make PREFIX=/opt/haproxy-ssl install 

但是,當我檢查我的配置文件,我有這樣的錯誤:

[ALERT] 275/135959 (10998) : parsing [/opt/haproxy-ssl/haproxy.conf:31] : 'bind' : 'ssl' option not implemented. [ALERT] 275/135959 (10998) : parsing [/opt/haproxy-ssl/haproxy.conf:69] : 'server' expects and [:] as arguments. [ALERT] 275/135959 (10998) : Error(s) found in configuration file : /opt/haproxy-ssl/haproxy.conf [WARNING] 275/135959 (10998) : Proxy 'ha_stats': in multi-process mode, stats will be limited to process assigned to the current request. [WARNING] 275/135959 (10998) : stats socket will not work correctly in multi-process mode (nbproc > 1). [ALERT] 275/135959 (10998) : Fatal errors found in configuration.

而且HAProxy的-vv命令返回:

HA-Proxy version 1.5-dev12 2012/09/10 Built without OpenSSL support (USE_OPENSSL not set)

我不明白爲什麼openssl沒有設置,雖然我沒有任何安裝過程中的錯誤。

OS:Debian的2.6.32-5-Xen的AMD64 OPENSSL:OpenSSL的0.9.8o 2010年6月1日

你有一個想法?

感謝

UPDATE:

與安裝的解決:

libssl-dev 

然後,新的make目標,新的前綴和它的作品。

+0

我試過重新創建了這個問題,但是它在我編譯haproxy時起作用。這是一個錯字嗎?我使用了下面的命令'make TARGET = linux2628 USE_OPENSSL = 1'。請注意目標和「USE_OPENSSL」的更改,而不是「USE_OPNSSL」,而是YMMV。 –

回答

7

在執行make命令之前安裝libssl-dev,並使用ssl與haproxy一起工作。

+2

在CENTOS的'openssl-devel'上。 –

+0

For Centos:yum pcre-devel和 yum openssl-devel – Azim

0

您可以在Centos和Ubuntu上安裝最新的OpenSSL。

RHEL:

yum install -y make GCC Perl pcre-devel zlib-devel 

Ubuntu的:

apt-get install build-essential make g++ libssl-dev 

現在,

# wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz 

# tar -zxf /tmp/openssl.tgz -C /tmp 

# cd /tmp/openssl-* 

# ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic 

# make 

# make install_sw 

您可以檢查OpenSSL的版本通過下面的命令,

# openssl version 

OpenSSL 1.0.2j 2016年9月26日