Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to compile and install HAProxy in Ubuntu system

Shulou Source: shulou.com Published: 2022-06-03 04:36:23 09月22日 Update

This article to share with you is in the Ubuntu system to compile and install HAProxy detailed tutorial, I believe most people still do not know how to install, in order to let everyone learn, to summarize the following content, words do not say much, look down together.

Environment OS:Ubuntu1804haproxy: http://www.haproxy.org/download/2.0/src/haproxy-2.0.4.tar.gzlua:http://www.lua.org/ftp/lua-5.3.5.tar.gzIP:192.168.7.182 Installation steps 1. Prepare to compile and install HAProxy's base environment # apt install make gcc build-essential libssl-dev zlib1g-dev pcr3 libpcre 3-dev libsystemd-dev libreadline-dev -y2. Compile and install lua to support extensions for HAProxy based on its implementation. Note: HAProxy requires lua minimum version 5.32.1 Download and install lua# wget -P /usr/local/src/http://www.lua.org/ftp/lua-5.3.5.tar.gz# cd /usr/local/src/# tar xf lua-5.3.5.tar.gz# cd lua-5.3.5/src/# make linux2.2 View compiled version # ./ lua -vLua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio3. Compile install haproxy 3.1 Extract and install # cd /usr/local/src/# tar xf haproxy-2.0.4.tar.gz# cd haproxy-2.0.4# make -j `lscpu| awk 'NR==4{print $2}'` ARCH=x86_64 TARGET=linux-glibc USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 USE_SYSTEMD=1 USE_CPU_AFFINITY=1 USE_LUA=1 LUA_INC=/usr/local/src/lua-5.3.5/src/ LUA_LIB=/usr/local/src/lua-5.3.5/src/ PREFIX=/apps/haproxy && make install PREFIX= /apps/haproxy 3.2 View compiled and installed version information # ./ haproxy -vHA-Proxy version 2.0.4 2019/08/06 -https://haproxy. org/4. Write haproxy startup script # cat > /lib/systemd/system/haproxy.service/etc/haproxy/haproxy. cfg

Tags: Compilation version system content tutorial status environment minimum information method function foundation most of that is in more steps directories see an article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MySQL Apple vpn Xiaomi