Haproxy 2.0.1安装

haproxy环境部署

  1. LUA编译安装以及Systemd开发包:
    curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
    yum install readline-devel
    tar zxvf lua-5.3.5.tar.gz
    cd lua-5.3.5
    make linux
    make INSTALL_TOP=/usr/local/lua install

    yum install systemd-devel
  2. 下载haproxy
    wget https://www.haproxy.org/download/2.0/src/haproxy-2.0.1.tar.gz
  3. 解压安装
    tar zxvf haproxy-2.0.1.tar.gz
    cd haproxy
    make -j $(nproc) TARGET=linux-glibc USE_OPENSSL=1 USE_ZLIB=1 USE_LUA=1 LUA_LIB=/usr/local/lua/lib/ LUA_INC=/usr/local/lua/include/ USE_PCRE=1 USE_SYSTEMD=1

    make install PREFIX=/usr/local/haproxy
  4. 创建运行账户
    useradd haproxy -s /sbin/nologin

检查是否支持SSL:

ldd haproxy | grep ssl
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f1f1625f000)

参考官网文档 详细配置文件说明

云溪-甩锅团 一键联系作者

独孤天血

文章作者信息...

相关推荐