by Devin Yang
(This article was automatically translated.)

Published - 5 years ago ( Updated - 5 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

Multiple ssh configuration files for public key authentication

When we use ssh public key authentication, we usually add relevant settings in ~/.ssh/config. If some are used by the company or at home, can multiple configs be used? In fact, it is possible. We can use git to load the company-shared, version-controlled config through Include.

linux

Remove the Linux Kernel that is not used by the old version on Ubuntu

This page describes how I removed the old version of Linux Kernel taking up space on ubuntu.

linux

How to change timezone on RHEL 7/CentOS7/Fedora

On the new version of RHEL 7/CentOS 7 or Fedora, we can check the status and make adjustments through timedatectl.