haproxy安装配置

# wget http://haproxy.1wt.eu/download/1.3/src/haproxy-1.3.15.5.tar.gz
# tar zxvf haproxy-1.3.15.5.tar.gz

 

# more README 部分如下:
To build haproxy, you have to choose your target OS amongst the following ones
and assign it to the TARGET variable :

- linux22        for Linux 2.2
- linux24        for Linux 2.4 and above (default)
- linux24e      for Linux 2.4 with support for a working epoll (> 0.21)
- linux24eold for Linux 2.4 with support for a broken epoll (<= 0.21)
- linux26        for Linux 2.6 and above

 

# mv haproxy-1.3.15.5 /usr/local/haproxy


# cd /usr/local/haproxy/


# make TARGET=linux26

 

[root@test haproxy]# pwd


/usr/local/haproxy


# groupadd haproxy


# useradd haproxy -g haproxy


通过/etc/passwd查看haproxy得uid和gid分别为504/506


# chmod u+x /var/log/haproxy.log

 

[root@test haproxy]# vi myself.conf



关于配置详细参考:
http://haproxy.1wt.eu/download/1.3/doc/haproxy-en.txt

[root@test haproxy]# ./haproxy -f /usr/local/haproxy/myself.conf
[root@test haproxy]# lsof -i:90
COMMAND   PID    USER   FD   TYPE DEVICE SIZE NODE NAME
haproxy 18019 haproxy    4u IPv4 307402       TCP *:dnsix (LISTEN)
haproxy 18020 haproxy    4u IPv4 307402       TCP *:dnsix (LISTEN)

http://192.168.1.250:90/stats
用户名admin密码admin

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值