Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compile and install HAProxy in Ubuntu system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report