by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

Record the process of compiling haproxy 1.8.9 under Ubuntu.

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/
compile
Because 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






 

Tags: linux

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


linux,system,config

Fix the problem that CentOS6.x can no longer be updated

There may still be some old programs in some places, which can only run the old system. But you want to be able to execute and install some desired packages, you may try this method. Please note that if this system is important to you, please evaluate it yourself. It is recommended that you have a Docker environment and have a backup image before trying it.

linux, cli

How to use the find command to find files that have been changed within 7 days

If we have changed some files, how to find out through the command line?

linux

Generate ssh key pair without password query

Sometimes it is necessary to generate an ssh key pair for automatic configuration. There is no password query in the command line, and an ssh key pair is generated.