Linux下haproxy安装使用示例

//系统
# cat /etc/redhat-release 
CentOS release 6.8 (Final)
# uname -r
2.6.32-642.el6.x86_64
//同步时间、关闭SELinux、关闭iptables
# ntpdate cn.pool.ntp.org && clock -w
//haproxy安装,版本1.7.9
# useradd haproxy -s /sbin/nologin
# id haproxy
uid=500(haproxy) gid=500(haproxy) 组=500(haproxy)
# tar xf haproxy-1.7.9.tar.gz -C /usr/src/
# cd /usr/src/haproxy-1.7.9/
//TARGET=linux26    代表指定内核大版本号,使用uname -a 就可以查到
//ARCH=x86_64   代表CPU的位数,32位还是64位
//PREFIX=/usr/local/haproxy    代表指定安装目录,注意:PREFIX必须为大写,否则不认
# make TARGET=linux26 ARCH=x86_64 PREFIX=/usr/local/haproxy
# make install PREFIX=/usr/local/haproxy/
//拷man文档到相应的目录,然后就可以man haproxy了
# cp /usr/local/haproxy/share/man/man1/haproxy.1 /usr/share/man/man1/
# ls /usr/local/haproxy/doc/haproxy/
//architecture.txt   架构体系和简单应用例子说明
//configuration.txt  配置文档,所有参数都有说明
//haproxy-en.txt     使用手册

猜你喜欢

转载自blog.csdn.net/qq_35590198/article/details/80576008