Centos Compiler Installation Haproxy

Source: Internet
Author: User
Tags haproxy

I. Introduction to the Environment

1.centos6

2. haproxy-1.4.25.tar.gz

Two. Installation

$ Curl-o http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.25.tar.gz$ tar zxvf haproxy-1.4. -. tar.gz$ CD Haproxy-1.4. -$ make TARGET=linux26 prefix=/usr/local/haproxy$ make install PREFIX=/usr/local/haproxy$ CP Examples/haproxy.cfg/usr/local/haproxy/$ CP Examples/haproxy.init/etc/init.d/haproxy$ chmod755/etc/init.d/haproxy$ Ln-s/usr/local/haproxy/etc/$ ln-s/usr/local/haproxy/sbin/haproxy/usr/sbin/$ groupadd haproxy$ useradd-G Haproxy haproxy-s/sbin/nologin-m$ grep haproxy/etc/passwdhaproxy:x:507:507::/home/haproxy:/sbin/nologin

 

Three. Configuration

$ vi/etc/haproxy/haproxy.cfgGlobalLog127.0.0.1local0 Log127.0.0.1local1 Notice #log loghost local0 info maxconn40960chroot/usr/local/haproxy UID803GID803Daemon Nbproc1#debug #quietdefaults LogGlobalmode HTTP option httplog option dontlognull option forwardfor option Httpclose retries 3option Redispatch maxconn -Timeout Connect500000Timeout Client5000000Timeout Server50000000frontend http-inchBind192.168.233.2: themode HTTP option httplog logGlobalACL is_a Hdr_beg (host)-i www.test.com ACL is_a Hdr_beg (host)-i test.com use_backend a_serverifis_a stats Enable stats hide-version stats URI/admin-Status Stats auth admin:admin123 stats adminifTRUE backend a_server balance Roundrobin cookie Session_cookie insert indirect nocache option HTTP CHK HEAD/default.aspx http/1.0Fullconn10000Server web58192.168.233.158: theMinconn -Maxconn +Cookie Web1 Weight6Check Inter -Rise2Fall4Server web85192.168.233.185: theMinconn -Maxconn +Cookie WEB2 Weight6Check Inter -Rise2Fall4

  

Four Start

/etc/init.d/haproxy start

  

Centos Compiler Installation Haproxy

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.