Ubuntu编译安装HAprox+Keepalived+MySQL负载高可用架构(结合Docker容器配置)
系统环境: Ubuntu16.04(Docker容器) 架构环境: Keepalived/HAproxy MASTER: 172.17.0.4 Keepalived/HAproxy BACKUP: 172.17.0.6 MySQL MASTER: 172.17.0.2 MySQL SLAVE: 172.17.0.3 HAproxy版本:haproxy-2.0.8.tar.gz Keepalived版本:keepalived-2.0.19.tar.gz 一、安装 HAproxy(MASTER/BACKUP两台都要装) 1、前往官网 https://www.haproxy.org/ 下载 HAproxy 解压,进入 haproxy-2.0.8目录 vim INSTALL;查看安装说明 2、编译安装HAproxy ( 1)编译 报错 1:bash: make: command not found 我直接用 docker容易,make命令没安装,安装一下: apt-get -y install make 然后执行: make -j 2 TARGET=generic USE_GZIP=1 报错 2:/bin/sh: 1: gcc: not found 未安装 gcc,安装gcc: apt-get -y install gcc 然后再执行: make -j 2 TARGET=generic