全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1154|回复: 5

Windows 下面编译 HAProxy

[复制链接]
发表于 2023-3-11 12:13:48 | 显示全部楼层 |阅读模式
本帖最后由 zxxx 于 2023-3-11 12:13 编辑

下载、安装 https://www.cygwin.com/setup-x86_64.exe







搜索 gcc 点击下箭头选择版本



搜索 make 点击下箭头选择版本



确认更改



完成

 楼主| 发表于 2023-3-11 12:13:49 | 显示全部楼层
本帖最后由 zxxx 于 2023-3-11 12:13 编辑

下载 https://github.com/haproxy/haproxy/archive/refs/tags/v2.7.0.tar.gz

保存到 C:\Temp\haproxy-2.7.0.tar.gz

启动 cygwin

  1. cd /cygdrive/c/Temp/
  2. tar zxvf haproxy-2.7.0.tar.gz
  3. cd /cygdrive/c/Temp/haproxy-2.7.0
  4. make TARGET=cygwin
  5. make install
  6. ls *.exe
复制代码

  1. haproxy.exe
复制代码


创建文件夹 C:\HAProxy

复制 C:\Temp\haproxy-2.7.0\haproxy.exe 到 C:\HAProxy

打开命令窗口运行 C:\HAProxy\haproxy.exe 提示



复制 C:\cygwin64\bin\cygwin1.dll 到 C:\HAProxy

再次运行

  1. HAProxy version 2.7.0-437fd289f2e3 2022/12/01 - https://haproxy.org/
  2. Status: stable branch - will stop receiving fixes around Q1 2024.
  3. Known bugs: http://www.haproxy.org/bugs/bugs-2.7.0.html
  4. Running on: CYGWIN_NT-10.0-20348 3.4.6-1.x86_64 2023-02-14 13:23 UTC x86_64
  5. Usage : haproxy [-f <cfgfile|cfgdir>]* [ -vdVD ] [ -n <maxconn> ] [ -N <maxpconn> ]
  6.         [ -p <pidfile> ] [ -m <max megs> ] [ -C <dir> ] [-- <cfgfile>*]
  7.         -v displays version ; -vv shows known build options.
  8.         -d enters debug mode ; -db only disables background mode.
  9.         -dM[<byte>,help,...] debug memory (default: poison with <byte>/0x50)
  10.         -V enters verbose mode (disables quiet mode)
  11.         -D goes daemon ; -C changes to <dir> before loading files.
  12.         -W master-worker mode.
  13.         -q quiet mode : don't display messages
  14.         -c check mode : only check config files and exit
  15.         -cc check condition : evaluate a condition and exit
  16.         -n sets the maximum total # of connections (uses ulimit -n)
  17.         -m limits the usable amount of memory (in MB)
  18.         -N sets the default, per-proxy maximum # of connections (0)
  19.         -L set local peer name (default to hostname)
  20.         -p writes pids of all children to this file
  21.         -dC[[key],line] display the configuration file, if there is a key, the file will be anonymised
  22.         -dp disables poll() usage even when available
  23.         -dK{class[,...]} dump registered keywords (use 'help' for list)
  24.         -dr ignores server address resolution failures
  25.         -dV disables SSL verify on servers side
  26.         -dW fails if any warning is emitted
  27.         -dD diagnostic mode : warn about suspicious configuration statements
  28.         -sf/-st [pid ]* finishes/terminates old pids.
  29.         -x <unix_socket> get listening sockets from a unix socket
  30.         -S <bind>[,<bind options>...] new master CLI
复制代码



下载:https://52u.lanzouy.com/iun6r0ptng5e 密码:ekxa






发表于 2023-3-11 12:15:15 来自手机 | 显示全部楼层
支持技术贴
发表于 2023-3-11 12:15:54 来自手机 | 显示全部楼层
操作系统上还没玩过,都是路由器的,
发表于 2023-3-11 15:13:21 来自手机 | 显示全部楼层
这个有啥用?搜了一下看不懂介绍
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-27 21:40 , Processed in 0.065458 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表