According to the README instructions of HAproxy, first compile the non-shared independent function library for haproxy to use.
Since I have already installed and compiled it, I will start with the compilation of OpneSSL.
Compile OpenSSL for HAproxy to use:
At the time of this article, the latest version of openssl I downloaded is 1.0.2o
wget https://www.openssl.org/source/openssl-1.0.2o.tar.gz
After decompression, enter the openssl-1.0.2 directory,
tar zxvf openssl-1.0.2o.tar.gz
cd haproxy-1.8.9/
Execute configuration and compilation:
export STATICLIBSSL=/tmp/staticlibssl
./config --prefix=$STATICLIBSSL no-shared
make && make install_sw
If there is an error in ./config configuration, #include "pcre.h" The relevant dev library is missing. My method is to search and find it before installing:
Ubuntu:
apt-cache search libpcre
apt-get install libpcre3-dev
CentOS is:
sudo yum install pcre-devel
After the installation is complete, re-execute config and make
Compile HAProxy
The HAProxy I downloaded in this article is the latest version of 1.8.9:
wget http://www.haproxy.org/download/1.8/src/haproxy-1.8.9.tar.gz
unzip
tar zxvf haproxy-1.8.9.tar.gz
Enter
cd haproxy-1.8.9/
compileBecause the Linux Kernel used is greater than 2.6.28 (uname -a view)
To compile HAProxy, use the following command.
make TARGET=linux2628 USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1
Everything goes smoothly, you can install the haproxy command into the system.
make install
No Comment
Post your comment