by Devin Yang
(This article was automatically translated.)

Published - 7 years ago ( Updated - 7 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,docker,wifi

Use docker to build a WPA2/EAP enterprise Radius authentication server, and the backend uses a mysql database

AP provides WPA2/EAP function, but it won't work? This article introduces how I can quickly build a Radius server through docker's ubuntu:21.04 image. Related applications such as WPA2/EAP of Wifi.

php,linux

WebShell Function Introduction and Precautions

I suddenly wanted to introduce what is WebShell, so I found one on the Internet. Its functions are quite good. But I still wanted some features, so I spent three nights making some small optimizations for him. If you haven't heard of WebShell yet, take a look at this video. If you like my optimized version, please give me a like, thank you.

linux,docker

How to execute X client and X Window in Container (docker gui)

Today I will talk to you about X, not iPhone X, nor X-Men, but X Window System, He is the main graphical interface display component of the current Linux system. Since it is very easy to expand and modularize, it has been used since it was established in 1986. The X Window system adopts the Client/Server architecture, which splits the application program and the display into two. The application program of X Windows is usually called X Client, and the display is the well-known X Server. The X client communicates with the X server through the X protocol (X protocol), which is an asynchronous network communication protocol.