2013年3月18日月曜日

haproxy1.5を試してみた。

haproxy1.5をインストールしてみました(`・ω・´)ゞビシッ!!

何かepelのパッケージから無くなったみたいなので、
ソースからコンパイルする事にしました(´;ω;`)ウッ…

それでは、行って行きたいと思います!
※設定ファイルなどの詳細はこちらの記事を参照してください
slaveの負荷分散&フェイルオーバー(HAProxy)
■手順1)ソースのダウンロード
wget http://haproxy.1wt.eu/download/1.5/src/devel/haproxy-1.5-dev17.tar.gz
■手順2)解凍する
# tar xzvf haproxy-1.5-dev17.tar.gz
haproxy-1.5-dev17/
haproxy-1.5-dev17/.gitignore
haproxy-1.5-dev17/CHANGELOG
haproxy-1.5-dev17/LICENSE
haproxy-1.5-dev17/Makefile
haproxy-1.5-dev17/Makefile.bsd
haproxy-1.5-dev17/Makefile.osx
haproxy-1.5-dev17/README
haproxy-1.5-dev17/ROADMAP
haproxy-1.5-dev17/SUBVERS
haproxy-1.5-dev17/TODO
haproxy-1.5-dev17/VERDATE
haproxy-1.5-dev17/VERSION
haproxy-1.5-dev17/contrib/
haproxy-1.5-dev17/contrib/base64/
haproxy-1.5-dev17/contrib/base64/base64rev-gen.c
haproxy-1.5-dev17/contrib/halog/
haproxy-1.5-dev17/contrib/halog/Makefile
haproxy-1.5-dev17/contrib/halog/fgets2.c
haproxy-1.5-dev17/contrib/halog/halog.c
haproxy-1.5-dev17/contrib/iprange/
haproxy-1.5-dev17/contrib/iprange/Makefile
haproxy-1.5-dev17/contrib/iprange/iprange.c
haproxy-1.5-dev17/contrib/netsnmp-perl/
haproxy-1.5-dev17/contrib/netsnmp-perl/README
haproxy-1.5-dev17/contrib/netsnmp-perl/cacti_data_query_haproxy_backends.xml
haproxy-1.5-dev17/contrib/netsnmp-perl/cacti_data_query_haproxy_frontends.xml
haproxy-1.5-dev17/contrib/netsnmp-perl/haproxy.pl
haproxy-1.5-dev17/contrib/netsnmp-perl/haproxy_backend.xml
haproxy-1.5-dev17/contrib/netsnmp-perl/haproxy_frontend.xml
haproxy-1.5-dev17/contrib/netsnmp-perl/haproxy_socket.xml
haproxy-1.5-dev17/contrib/selinux/
haproxy-1.5-dev17/contrib/selinux/README
haproxy-1.5-dev17/contrib/selinux/haproxy.fc
haproxy-1.5-dev17/contrib/selinux/haproxy.if
haproxy-1.5-dev17/contrib/selinux/haproxy.te
haproxy-1.5-dev17/contrib/trace/
haproxy-1.5-dev17/contrib/trace/trace.awk
haproxy-1.5-dev17/doc/
haproxy-1.5-dev17/doc/acl.fig
haproxy-1.5-dev17/doc/architecture.txt
haproxy-1.5-dev17/doc/close-options.txt
haproxy-1.5-dev17/doc/coding-style.txt
haproxy-1.5-dev17/doc/configuration.txt
haproxy-1.5-dev17/doc/cookie-options.txt
haproxy-1.5-dev17/doc/design-thoughts/
haproxy-1.5-dev17/doc/design-thoughts/backends-v0.txt
haproxy-1.5-dev17/doc/design-thoughts/backends.txt
haproxy-1.5-dev17/doc/design-thoughts/be-fe-changes.txt
haproxy-1.5-dev17/doc/design-thoughts/buffer-redesign.txt
haproxy-1.5-dev17/doc/design-thoughts/buffers.fig
haproxy-1.5-dev17/doc/design-thoughts/config-language.txt
haproxy-1.5-dev17/doc/design-thoughts/cttproxy-changes.txt
haproxy-1.5-dev17/doc/design-thoughts/how-it-works.txt
haproxy-1.5-dev17/doc/design-thoughts/http_load_time.url
haproxy-1.5-dev17/doc/design-thoughts/rate-shaping.txt
haproxy-1.5-dev17/doc/design-thoughts/sess_par_sec.txt
haproxy-1.5-dev17/doc/gpl.txt
haproxy-1.5-dev17/doc/haproxy-en.txt
haproxy-1.5-dev17/doc/haproxy-fr.txt
haproxy-1.5-dev17/doc/haproxy.1
haproxy-1.5-dev17/doc/internals/
haproxy-1.5-dev17/doc/internals/acl.txt
haproxy-1.5-dev17/doc/internals/buffer-operations.txt
haproxy-1.5-dev17/doc/internals/buffer-ops.fig
haproxy-1.5-dev17/doc/internals/connect-status.txt
haproxy-1.5-dev17/doc/internals/connection-header.txt
haproxy-1.5-dev17/doc/internals/connection-scale.txt
haproxy-1.5-dev17/doc/internals/entities.fig
haproxy-1.5-dev17/doc/internals/entities.pdf
haproxy-1.5-dev17/doc/internals/entities.svg
haproxy-1.5-dev17/doc/internals/entities.txt
haproxy-1.5-dev17/doc/internals/header-parser-speed.txt
haproxy-1.5-dev17/doc/internals/header-tree.txt
haproxy-1.5-dev17/doc/internals/http-cookies.txt
haproxy-1.5-dev17/doc/internals/http-docs.txt
haproxy-1.5-dev17/doc/internals/http-parsing.txt
haproxy-1.5-dev17/doc/internals/naming.txt
haproxy-1.5-dev17/doc/internals/repartition-be-fe-fi.txt
haproxy-1.5-dev17/doc/internals/stats-v2.txt
haproxy-1.5-dev17/doc/internals/stream-sock-states.fig
haproxy-1.5-dev17/doc/internals/todo.cttproxy
haproxy-1.5-dev17/doc/lgpl.txt
haproxy-1.5-dev17/doc/proxy-protocol.txt
haproxy-1.5-dev17/doc/queuing.fig
haproxy-1.5-dev17/ebtree/
haproxy-1.5-dev17/ebtree/LICENSE
haproxy-1.5-dev17/ebtree/compiler.h
haproxy-1.5-dev17/ebtree/eb32tree.c
haproxy-1.5-dev17/ebtree/eb32tree.h
haproxy-1.5-dev17/ebtree/eb64tree.c
haproxy-1.5-dev17/ebtree/eb64tree.h
haproxy-1.5-dev17/ebtree/ebimtree.c
haproxy-1.5-dev17/ebtree/ebimtree.h
haproxy-1.5-dev17/ebtree/ebistree.c
haproxy-1.5-dev17/ebtree/ebistree.h
haproxy-1.5-dev17/ebtree/ebmbtree.c
haproxy-1.5-dev17/ebtree/ebmbtree.h
haproxy-1.5-dev17/ebtree/ebpttree.c
haproxy-1.5-dev17/ebtree/ebpttree.h
haproxy-1.5-dev17/ebtree/ebsttree.c
haproxy-1.5-dev17/ebtree/ebsttree.h
haproxy-1.5-dev17/ebtree/ebtree.c
haproxy-1.5-dev17/ebtree/ebtree.h
haproxy-1.5-dev17/examples/
haproxy-1.5-dev17/examples/acl-content-sw.cfg
haproxy-1.5-dev17/examples/auth.cfg
haproxy-1.5-dev17/examples/build.cfg
haproxy-1.5-dev17/examples/check
haproxy-1.5-dev17/examples/check.conf
haproxy-1.5-dev17/examples/config.rc.haproxy
haproxy-1.5-dev17/examples/content-sw-sample.cfg
haproxy-1.5-dev17/examples/cttproxy-src.cfg
haproxy-1.5-dev17/examples/debug2ansi
haproxy-1.5-dev17/examples/debug2html
haproxy-1.5-dev17/examples/debugfind
haproxy-1.5-dev17/examples/errorfiles/
haproxy-1.5-dev17/examples/errorfiles/400.http
haproxy-1.5-dev17/examples/errorfiles/403.http
haproxy-1.5-dev17/examples/errorfiles/408.http
haproxy-1.5-dev17/examples/errorfiles/500.http
haproxy-1.5-dev17/examples/errorfiles/502.http
haproxy-1.5-dev17/examples/errorfiles/503.http
haproxy-1.5-dev17/examples/errorfiles/504.http
haproxy-1.5-dev17/examples/errorfiles/README
haproxy-1.5-dev17/examples/examples.cfg
haproxy-1.5-dev17/examples/haproxy-1.1.21-flx.1.pkg
haproxy-1.5-dev17/examples/haproxy.cfg
haproxy-1.5-dev17/examples/haproxy.init
haproxy-1.5-dev17/examples/haproxy.spec
haproxy-1.5-dev17/examples/haproxy.vim
haproxy-1.5-dev17/examples/init.haproxy
haproxy-1.5-dev17/examples/init.haproxy.flx0
haproxy-1.5-dev17/examples/linux-2.4.21-40.EL-custom.diff
haproxy-1.5-dev17/examples/option-http_proxy.cfg
haproxy-1.5-dev17/examples/rc.highsock
haproxy-1.5-dev17/examples/stats_haproxy.sh
haproxy-1.5-dev17/examples/tarpit.cfg
haproxy-1.5-dev17/examples/test-section-kw.cfg
haproxy-1.5-dev17/examples/url-switching.cfg
haproxy-1.5-dev17/include/
haproxy-1.5-dev17/include/common/
haproxy-1.5-dev17/include/common/accept4.h
haproxy-1.5-dev17/include/common/appsession.h
haproxy-1.5-dev17/include/common/base64.h
haproxy-1.5-dev17/include/common/buffer.h
haproxy-1.5-dev17/include/common/cfgparse.h
haproxy-1.5-dev17/include/common/chunk.h
haproxy-1.5-dev17/include/common/compat.h
haproxy-1.5-dev17/include/common/compiler.h
haproxy-1.5-dev17/include/common/config.h
haproxy-1.5-dev17/include/common/debug.h
haproxy-1.5-dev17/include/common/defaults.h
haproxy-1.5-dev17/include/common/epoll.h
haproxy-1.5-dev17/include/common/errors.h
haproxy-1.5-dev17/include/common/memory.h
haproxy-1.5-dev17/include/common/mini-clist.h
haproxy-1.5-dev17/include/common/rbtree.h
haproxy-1.5-dev17/include/common/regex.h
haproxy-1.5-dev17/include/common/sessionhash.h
haproxy-1.5-dev17/include/common/splice.h
haproxy-1.5-dev17/include/common/standard.h
haproxy-1.5-dev17/include/common/syscall.h
haproxy-1.5-dev17/include/common/template.h
haproxy-1.5-dev17/include/common/ticks.h
haproxy-1.5-dev17/include/common/time.h
haproxy-1.5-dev17/include/common/tools.h
haproxy-1.5-dev17/include/common/uri_auth.h
haproxy-1.5-dev17/include/common/version.h
haproxy-1.5-dev17/include/import/
haproxy-1.5-dev17/include/import/ip_tproxy.h
haproxy-1.5-dev17/include/proto/
haproxy-1.5-dev17/include/proto/acl.h
haproxy-1.5-dev17/include/proto/arg.h
haproxy-1.5-dev17/include/proto/auth.h
haproxy-1.5-dev17/include/proto/backend.h
haproxy-1.5-dev17/include/proto/channel.h
haproxy-1.5-dev17/include/proto/checks.h
haproxy-1.5-dev17/include/proto/compression.h
haproxy-1.5-dev17/include/proto/connection.h
haproxy-1.5-dev17/include/proto/cttproxy.h
haproxy-1.5-dev17/include/proto/dumpstats.h
haproxy-1.5-dev17/include/proto/fd.h
haproxy-1.5-dev17/include/proto/freq_ctr.h
haproxy-1.5-dev17/include/proto/frontend.h
haproxy-1.5-dev17/include/proto/hdr_idx.h
haproxy-1.5-dev17/include/proto/lb_chash.h
haproxy-1.5-dev17/include/proto/lb_fas.h
haproxy-1.5-dev17/include/proto/lb_fwlc.h
haproxy-1.5-dev17/include/proto/lb_fwrr.h
haproxy-1.5-dev17/include/proto/lb_map.h
haproxy-1.5-dev17/include/proto/listener.h
haproxy-1.5-dev17/include/proto/log.h
haproxy-1.5-dev17/include/proto/obj_type.h
haproxy-1.5-dev17/include/proto/peers.h
haproxy-1.5-dev17/include/proto/pipe.h
haproxy-1.5-dev17/include/proto/port_range.h
haproxy-1.5-dev17/include/proto/proto_http.h
haproxy-1.5-dev17/include/proto/proto_tcp.h
haproxy-1.5-dev17/include/proto/proto_uxst.h
haproxy-1.5-dev17/include/proto/protocol.h
haproxy-1.5-dev17/include/proto/proxy.h
haproxy-1.5-dev17/include/proto/queue.h
haproxy-1.5-dev17/include/proto/raw_sock.h
haproxy-1.5-dev17/include/proto/sample.h
haproxy-1.5-dev17/include/proto/server.h
haproxy-1.5-dev17/include/proto/session.h
haproxy-1.5-dev17/include/proto/shctx.h
haproxy-1.5-dev17/include/proto/signal.h
haproxy-1.5-dev17/include/proto/ssl_sock.h
haproxy-1.5-dev17/include/proto/stick_table.h
haproxy-1.5-dev17/include/proto/stream_interface.h
haproxy-1.5-dev17/include/proto/task.h
haproxy-1.5-dev17/include/proto/template.h
haproxy-1.5-dev17/include/types/
haproxy-1.5-dev17/include/types/acl.h
haproxy-1.5-dev17/include/types/arg.h
haproxy-1.5-dev17/include/types/auth.h
haproxy-1.5-dev17/include/types/backend.h
haproxy-1.5-dev17/include/types/capture.h
haproxy-1.5-dev17/include/types/channel.h
haproxy-1.5-dev17/include/types/checks.h
haproxy-1.5-dev17/include/types/compression.h
haproxy-1.5-dev17/include/types/connection.h
haproxy-1.5-dev17/include/types/counters.h
haproxy-1.5-dev17/include/types/fd.h
haproxy-1.5-dev17/include/types/freq_ctr.h
haproxy-1.5-dev17/include/types/global.h
haproxy-1.5-dev17/include/types/hdr_idx.h
haproxy-1.5-dev17/include/types/lb_chash.h
haproxy-1.5-dev17/include/types/lb_fas.h
haproxy-1.5-dev17/include/types/lb_fwlc.h
haproxy-1.5-dev17/include/types/lb_fwrr.h
haproxy-1.5-dev17/include/types/lb_map.h
haproxy-1.5-dev17/include/types/listener.h
haproxy-1.5-dev17/include/types/log.h
haproxy-1.5-dev17/include/types/obj_type.h
haproxy-1.5-dev17/include/types/peers.h
haproxy-1.5-dev17/include/types/pipe.h
haproxy-1.5-dev17/include/types/port_range.h
haproxy-1.5-dev17/include/types/proto_http.h
haproxy-1.5-dev17/include/types/proto_tcp.h
haproxy-1.5-dev17/include/types/protocol.h
haproxy-1.5-dev17/include/types/proxy.h
haproxy-1.5-dev17/include/types/queue.h
haproxy-1.5-dev17/include/types/sample.h
haproxy-1.5-dev17/include/types/server.h
haproxy-1.5-dev17/include/types/session.h
haproxy-1.5-dev17/include/types/signal.h
haproxy-1.5-dev17/include/types/ssl_sock.h
haproxy-1.5-dev17/include/types/stick_table.h
haproxy-1.5-dev17/include/types/stream_interface.h
haproxy-1.5-dev17/include/types/task.h
haproxy-1.5-dev17/include/types/template.h
haproxy-1.5-dev17/src/
haproxy-1.5-dev17/src/acl.c
haproxy-1.5-dev17/src/appsession.c
haproxy-1.5-dev17/src/arg.c
haproxy-1.5-dev17/src/auth.c
haproxy-1.5-dev17/src/backend.c
haproxy-1.5-dev17/src/base64.c
haproxy-1.5-dev17/src/buffer.c
haproxy-1.5-dev17/src/cfgparse.c
haproxy-1.5-dev17/src/channel.c
haproxy-1.5-dev17/src/checks.c
haproxy-1.5-dev17/src/chunk.c
haproxy-1.5-dev17/src/compression.c
haproxy-1.5-dev17/src/connection.c
haproxy-1.5-dev17/src/cttproxy.c
haproxy-1.5-dev17/src/dumpstats.c
haproxy-1.5-dev17/src/ev_epoll.c
haproxy-1.5-dev17/src/ev_kqueue.c
haproxy-1.5-dev17/src/ev_poll.c
haproxy-1.5-dev17/src/ev_select.c
haproxy-1.5-dev17/src/fd.c
haproxy-1.5-dev17/src/freq_ctr.c
haproxy-1.5-dev17/src/frontend.c
haproxy-1.5-dev17/src/haproxy.c
haproxy-1.5-dev17/src/hdr_idx.c
haproxy-1.5-dev17/src/i386-linux-vsys.c
haproxy-1.5-dev17/src/lb_chash.c
haproxy-1.5-dev17/src/lb_fas.c
haproxy-1.5-dev17/src/lb_fwlc.c
haproxy-1.5-dev17/src/lb_fwrr.c
haproxy-1.5-dev17/src/lb_map.c
haproxy-1.5-dev17/src/listener.c
haproxy-1.5-dev17/src/log.c
haproxy-1.5-dev17/src/memory.c
haproxy-1.5-dev17/src/peers.c
haproxy-1.5-dev17/src/pipe.c
haproxy-1.5-dev17/src/proto_http.c
haproxy-1.5-dev17/src/proto_tcp.c
haproxy-1.5-dev17/src/proto_uxst.c
haproxy-1.5-dev17/src/protocol.c
haproxy-1.5-dev17/src/proxy.c
haproxy-1.5-dev17/src/queue.c
haproxy-1.5-dev17/src/raw_sock.c
haproxy-1.5-dev17/src/rbtree.c
haproxy-1.5-dev17/src/regex.c
haproxy-1.5-dev17/src/sample.c
haproxy-1.5-dev17/src/server.c
haproxy-1.5-dev17/src/session.c
haproxy-1.5-dev17/src/sessionhash.c
haproxy-1.5-dev17/src/shctx.c
haproxy-1.5-dev17/src/signal.c
haproxy-1.5-dev17/src/ssl_sock.c
haproxy-1.5-dev17/src/standard.c
haproxy-1.5-dev17/src/stick_table.c
haproxy-1.5-dev17/src/stream_interface.c
haproxy-1.5-dev17/src/task.c
haproxy-1.5-dev17/src/time.c
haproxy-1.5-dev17/src/trace.c
haproxy-1.5-dev17/src/uri_auth.c
haproxy-1.5-dev17/tests/
haproxy-1.5-dev17/tests/0000-debug-stats.diff
haproxy-1.5-dev17/tests/active-sh.cfg
haproxy-1.5-dev17/tests/active-srv.cfg
haproxy-1.5-dev17/tests/backup-all-sh.cfg
haproxy-1.5-dev17/tests/backup-all.cfg
haproxy-1.5-dev17/tests/backup-first.cfg
haproxy-1.5-dev17/tests/backup-second-sh.cfg
haproxy-1.5-dev17/tests/backup-second.cfg
haproxy-1.5-dev17/tests/basic-test.cfg
haproxy-1.5-dev17/tests/defaults.cfg
haproxy-1.5-dev17/tests/filltab25.c
haproxy-1.5-dev17/tests/hash_results.txt
haproxy-1.5-dev17/tests/httpterm-basic.cfg
haproxy-1.5-dev17/tests/io_limits.txt
haproxy-1.5-dev17/tests/ip-hash.c
haproxy-1.5-dev17/tests/reset.c
haproxy-1.5-dev17/tests/sessionhash_test.c
haproxy-1.5-dev17/tests/sockstat.txt
haproxy-1.5-dev17/tests/test-acl.cfg
haproxy-1.5-dev17/tests/test-address-syntax.cfg
haproxy-1.5-dev17/tests/test-arg.c
haproxy-1.5-dev17/tests/test-backlog.cfg
haproxy-1.5-dev17/tests/test-balance.cfg
haproxy-1.5-dev17/tests/test-check-cpu.cfg
haproxy-1.5-dev17/tests/test-check-expect.cfg
haproxy-1.5-dev17/tests/test-connection.cfg
haproxy-1.5-dev17/tests/test-cookie-appsess.cfg
haproxy-1.5-dev17/tests/test-cookie-indirect.cfg
haproxy-1.5-dev17/tests/test-cookie-insert.cfg
haproxy-1.5-dev17/tests/test-cookie-passive.cfg
haproxy-1.5-dev17/tests/test-cookie-prefix.cfg
haproxy-1.5-dev17/tests/test-cookie-rewrite.cfg
haproxy-1.5-dev17/tests/test-disable-404.cfg
haproxy-1.5-dev17/tests/test-fsm.cfg
haproxy-1.5-dev17/tests/test-fwlc.cfg
haproxy-1.5-dev17/tests/test-fwrr.cfg
haproxy-1.5-dev17/tests/test-http-send-name-hdr.cfg
haproxy-1.5-dev17/tests/test-inspect-smtp.cfg
haproxy-1.5-dev17/tests/test-inspect-ssl.cfg
haproxy-1.5-dev17/tests/test-log.cfg
haproxy-1.5-dev17/tests/test-map-ports.cfg
haproxy-1.5-dev17/tests/test-pollers.cfg
haproxy-1.5-dev17/tests/test-redir.cfg
haproxy-1.5-dev17/tests/test-redirect.cfg
haproxy-1.5-dev17/tests/test-retries.cfg
haproxy-1.5-dev17/tests/test-sched.cfg
haproxy-1.5-dev17/tests/test-sql.cfg
haproxy-1.5-dev17/tests/test-status.cfg
haproxy-1.5-dev17/tests/test-time.cfg
haproxy-1.5-dev17/tests/test-timeout.cfg
haproxy-1.5-dev17/tests/test-url-hash.cfg
haproxy-1.5-dev17/tests/test-valid-names.cfg
haproxy-1.5-dev17/tests/test.c
haproxy-1.5-dev17/tests/test_hashes.c
haproxy-1.5-dev17/tests/test_pools.c
haproxy-1.5-dev17/tests/testinet.c
haproxy-1.5-dev17/tests/uri_hash.c
■手順3)解凍したらディレクトリが作られているのでディレクトリへ移動する
#
cd haproxy-1.5-dev17
■手順4)makeする 注意点として、make時にOS,CPUの種類を指定してやる必要があるそうです。
指定時のオプションは次の一覧から指定する必要があります。
TARGET一覧
  - 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)
  - linux26     for Linux 2.6 and above
  - linux2628   for Linux 2.6.28 and above (enables splice and tproxy)
  - solaris     for Solaris 8 or 10 (others untested)
  - freebsd     for FreeBSD 5 to 8.0 (others untested)
  - openbsd     for OpenBSD 3.1 to 5.2 (others untested)
  - aix52       for AIX 5.2
  - cygwin      for Cygwin
  - generic     for any other OS.
  - custom      to manually adjust every setting

ARCH一覧
(i386,i486,i586,i686,x86_64),
CentOS 64bit版の場合はこちらになります。
sudo make TARGET=linux26 ARCH=x86_64
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" \
              -DBUILD_TARGET='"linux26"' \
              -DBUILD_ARCH='"x86_64"' \
              -DBUILD_CPU='"generic"' \
              -DBUILD_CC='"gcc"' \
              -DBUILD_CFLAGS='"-m64 -march=x86-64 -O2 -g -fno-strict-aliasing"' \
              -DBUILD_OPTIONS='""' \
               -c -o src/haproxy.o src/haproxy.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/sessionhash.o src/sessionhash.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/base64.o src/base64.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/protocol.o src/protocol.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/uri_auth.o src/uri_auth.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/standard.o src/standard.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/buffer.o src/buffer.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/log.o src/log.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/task.o src/task.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/chunk.o src/chunk.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/channel.o src/channel.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/listener.o src/listener.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/time.o src/time.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/fd.o src/fd.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/pipe.o src/pipe.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/regex.o src/regex.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/cfgparse.o src/cfgparse.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/server.o src/server.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/checks.o src/checks.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/queue.o src/queue.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/frontend.o src/frontend.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/proxy.o src/proxy.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/peers.o src/peers.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/arg.o src/arg.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/stick_table.o src/stick_table.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/proto_uxst.o src/proto_uxst.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/connection.o src/connection.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/proto_http.o src/proto_http.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/raw_sock.o src/raw_sock.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/appsession.o src/appsession.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/backend.o src/backend.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/lb_chash.o src/lb_chash.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/lb_fwlc.o src/lb_fwlc.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/lb_fwrr.o src/lb_fwrr.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/lb_map.o src/lb_map.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/lb_fas.o src/lb_fas.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/stream_interface.o src/stream_interface.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/dumpstats.o src/dumpstats.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/proto_tcp.o src/proto_tcp.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/session.o src/session.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/hdr_idx.o src/hdr_idx.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/ev_select.o src/ev_select.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/signal.o src/signal.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/acl.o src/acl.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/sample.o src/sample.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/memory.o src/memory.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/freq_ctr.o src/freq_ctr.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/auth.o src/auth.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/compression.o src/compression.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/ev_poll.o src/ev_poll.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o src/ev_epoll.o src/ev_epoll.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o ebtree/ebtree.o ebtree/ebtree.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o ebtree/eb32tree.o ebtree/eb32tree.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o ebtree/eb64tree.o ebtree/eb64tree.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o ebtree/ebmbtree.o ebtree/ebmbtree.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o ebtree/ebsttree.o ebtree/ebsttree.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o ebtree/ebimtree.o ebtree/ebimtree.c
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.5-dev17\" -DCONFIG_HAPROXY_DATE=\"2012/12/28\" -c -o ebtree/ebistree.o ebtree/ebistree.c
gcc -m64 -march=x86-64 -g -o haproxy src/haproxy.o src/sessionhash.o src/base64.o src/protocol.o src/uri_auth.o src/standard.o src/buffer.o src/log.o src/task.o src/chunk.o src/channel.o src/listener.o src/time.o src/fd.o src/pipe.o src/regex.o src/cfgparse.o src/server.o src/checks.o src/queue.o src/frontend.o src/proxy.o src/peers.o src/arg.o src/stick_table.o src/proto_uxst.o src/connection.o src/proto_http.o src/raw_sock.o src/appsession.o src/backend.o src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o src/lb_fas.o src/stream_interface.o src/dumpstats.o src/proto_tcp.o src/session.o src/hdr_idx.o src/ev_select.o src/signal.o src/acl.o src/sample.o src/memory.o src/freq_ctr.o src/auth.o src/compression.o src/ev_poll.o src/ev_epoll.o ebtree/ebtree.o ebtree/eb32tree.o ebtree/eb64tree.o ebtree/ebmbtree.o ebtree/ebsttree.o ebtree/ebimtree.o ebtree/ebistree.o   -lcrypt
■手順5)make installを実行する
#
sudo make install
install -d /usr/local/sbin
install haproxy /usr/local/sbin
install -d /usr/local/share/man/man1
install -m 644 doc/haproxy.1 /usr/local/share/man/man1
install -d /usr/local/doc/haproxy
for x in configuration architecture haproxy-en haproxy-fr; do \
                install -m 644 doc/$x.txt /usr/local/doc/haproxy ; \
        done
■手順6)起動ファイルのコピー
#
sudo cp examples/haproxy.init /etc/init.d/haproxy
■手順7)起動ファイルに権限を与える
#
sudo chmod +x /etc/init.d/haproxy
■haproxyユーザーを作成する
#
sudo useradd -s /sbin/nologin haproxy
■手順8)chroot用のディレクトリを作成する
#ディレクトリを作成する
sudo mkdir /var/lib/haproxy

#ディレクトリの所有者をhaproxyに変更する
sudo chown haproxy:haproxy /var/lib/haproxy
■手順9)設定ファイル用にディレクトリを作成する
#
sudo mkdir /etc/haproxy/
■手順10)設定ファイルの作成
#
sudo vi /etc/haproxy/haproxy.cfg
#全般設定
global
        #logログの出力先とファシリティの設定(emerg,alert,crit,err,warning,notice,info,debug)
#       log             127.0.0.1 local2
        log             127.0.0.1 local7 debug
        #chrootするパスを指定
        chroot          /var/lib/haproxy
        pidfile         /var/run/haproxy.pid
        #プロセスごとの最大同時接続数
        maxconn         4000
        #サービスを動作させるユーザー名
        user            haproxy
        #サービスを動作させるグループ名
        group           haproxy
        #バックグラウンドで動作する
        daemon
        stats socket /var/lib/haproxy/stats
        #deamonモードで起動するプロセス数
        nbproc          1
#プロキシ動作のデフォルト設定
defaults
        #動作モード
        mode            tcp
        log             global
        #各種動作オプション
        option          tcplog
 
#frontendセクションで対クライアントの待ち受けポートを指定、
#backendセクションで実サーバ群の設定と負荷分散アルゴリズムを指定する。
#master用
#listen mysql-master
#        #ローカルからの接続ではなくて外部からの接続を許可する場合には、
#        #bind 0.0.0.0:3306
#        #bind :3306(コロンの前に何も書かない)
#        #bind HAProxyのIPアドレス:3306
#        #のどれかにすれば良い?
#        #複数指定する場合にはカンマ区切り
#        #bind :80,:443みたいに。
#        bind 192.168.0.25:3306
#        #
#        mode tcp
#        #
#        log             127.0.0.1 local0 debug
#        #リトライ回数
#        retries         1
#        #接続タイムアウト
#        timeout connect 10s
#        #クライアント側のタイムアウト時間
#        timeout client  1m
#        #サーバ側のタイムアウト時間
#        timeout server  1m
#        #
#        option          mysql-check user haproxy
#        #
#        server master masterサーバーのIPアドレス check port 3306 inter 1000 fall 3
#slave用
listen  mysql-slave
        #HAProxyのサーバーIPアドレスの指定(ユニークにする)
        #待ち受けるIPアドレス、ポート等を指定
        bind            192.168.0.25:3307
        #
        mode            tcp
        #リトライ回数
        retries         1
        #接続タイムアウト
        timeout connect 10s
        #クライアント側のタイムアウト時間
        timeout client  1m
        #サーバ側のタイムアウト時間
        timeout server  1m
        #
        option          mysql-check user haproxy
        #ヘルスチェック時のアクションが詳細にログに出る
        option          log-health-checks
        #負荷分散アルゴリズム。roundrobin、static-rr、leastconn、source、uri、url_param、hdr、rdp-cookieから選択。
        balance         roundrobin
        #ラウンドロビンの対象サーバーの定義
        #checkはヘルスチェックの有効化
        #interでヘルチェック間隔の指定(ミリ秒)
        #fallは2回ヘルチェックが落ちたら振り分け対象から外す
        #weightは、振り分け時の重み。数値が高いほど振り分けられる可能性が高い。
        #dev,staging
#        server slave1 192.168.0.22:3306 weight 1 check port 3306 inter 1000 fall 3
        #production
       server slave1 192.168.0.23:3306 weight 1 check port 3306 inter 1000 fall 3
       server slave2 192.168.0.24:3306 weight 1 check port 3306 inter 1000 fall 3
        #バックアップサーバー
       server slave3 192.168.0.28:3306 check port 3306 backup
■手順11)haproxyのシンボリックリンクを張る
#
sudo ln -s /usr/local/sbin/haproxy /usr/sbin/haproxy
■手順12)masterにhaproxyユーザーを作成する。(masterで作ればslaveにはレプリケーションされる)
#ヘルスチェック用にローカルからの接続は許可。(パスワードなし)
GRANT ALL ON *.* TO 'haproxy'@'192.168.0.%';
※パスワードありだと出来ないかも?設定ファイルにパスワードの設定項目が見当たらない(´;ω;`)ウッ…

また、HAProxyを利用することで、MySQLへの接続元がHAProxyサーバーに変わるため、
もし接続元に制限をかけている場合には、
今まで利用していた接続ユーザーに追加で設定してあげること。
HAProxyは、slave用なので、SELECTの権限だけあれば(・∀・)イイアルネ!!

たとえば、今まで利用していた接続アカウントが「test」で、
HAProxyサーバーのIPアドレスが「192.168.0.25」だった場合には、次のようになります。
#ローカルIPアドレス全てからの接続を許可して、全てのデータベースに対してSELECT権限だけ付与する場合
GRANT SELECT ON *.* TO 'test'@'192.168.0.%' IDENTIFIED BY 'test-password';

#192.168.0.25からの接続のみを許可して、test_dbのデータベースに対してSELECT、INSERT、UPDATEの権限だけ付与する場合
GRANT SELECT, INSERT, UPDATE ON test_db.* TO 'test'@'192.168.0.25' IDENTIFIED BY 'test-password';

#ローカルIPアドレス全てからの接続を許可して、全てのデータベースに対して全ての権限を付与する場合
GRANT ALL ON *.* TO 'k_1'@'192.168.0.%' IDENTIFIED BY 'test-password';
追加したら設定の反映を忘れずに!(`・ω・´)シャキーン
FLUSH PRIVILEGES;
■手順13)起動する
#
sudo /etc/init.d/haproxy start
Starting haproxy:                                          [  OK  ]
■手順14)haproxy経由での接続を試す。
#接続を試す。(パスワードなし)
mysql -u admin -h 192.168.0.25 -P 3307
■手順15)haproxyのログ設定を行う haproxyはsyslogを利用しているので、その設定をする必要がある。
今回は「syslog-ng」を利用したいと思います。
$ sudo yum install syslog-ng*
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, kabi, presto, priorities, security, tmprepo, verify, versionlock
Loading support for CentOS kernel ABI
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                                                                                | 5.6 kB     00:00
 * base: ftp.riken.jp
 * centosplus: ftp.riken.jp
 * elrepo: repos.lax-noc.com
 * epel: ftp.kddilabs.jp
 * extras: ftp.riken.jp
 * rpmforge: mirror.oscc.org.my
 * updates: ftp.riken.jp
base                                                                                                                                                                                                         | 3.7 kB     00:00
centosplus                                                                                                                                                                                                   | 3.5 kB     00:00
elrepo                                                                                                                                                                                                       | 2.9 kB     00:00
extras                                                                                                                                                                                                       | 3.5 kB     00:00
rpmforge                                                                                                                                                                                                     | 1.9 kB     00:00
updates                                                                                                                                                                                                      | 3.5 kB     00:00
165 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package syslog-ng.x86_64 0:3.2.5-3.el6 will be installed
--> Processing Dependency: libnet.so.1()(64bit) for package: syslog-ng-3.2.5-3.el6.x86_64
--> Processing Dependency: libevtlog.so.0()(64bit) for package: syslog-ng-3.2.5-3.el6.x86_64
---> Package syslog-ng-devel.x86_64 0:3.2.5-3.el6 will be installed
---> Package syslog-ng-libdbi.x86_64 0:3.2.5-3.el6 will be installed
--> Processing Dependency: libdbi.so.0()(64bit) for package: syslog-ng-libdbi-3.2.5-3.el6.x86_64
--> Running transaction check
---> Package eventlog.x86_64 0:0.2.12-1.el6 will be installed
---> Package libdbi.x86_64 0:0.8.3-3.1.el6 will be installed
---> Package libnet.x86_64 0:1.1.5-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================================================================================
 Package                                                      Arch                                               Version                                                     Repository                                        Size
====================================================================================================================================================================================================================================
Installing:
 syslog-ng                                                    x86_64                                             3.2.5-3.el6                                                 epel                                             440 k
 syslog-ng-devel                                              x86_64                                             3.2.5-3.el6                                                 epel                                              55 k
 syslog-ng-libdbi                                             x86_64                                             3.2.5-3.el6                                                 epel                                              31 k
Installing for dependencies:
 eventlog                                                     x86_64                                             0.2.12-1.el6                                                epel                                              17 k
 libdbi                                                       x86_64                                             0.8.3-3.1.el6                                               base                                              39 k
 libnet                                                       x86_64                                             1.1.5-1.el6                                                 epel                                              54 k

Transaction Summary
====================================================================================================================================================================================================================================
Install       6 Package(s)

Total download size: 636 k
Installed size: 2.0 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 636 k
(1/6): eventlog-0.2.12-1.el6.x86_64.rpm                                                                                                                                                                      |  17 kB     00:00
(2/6): libdbi-0.8.3-3.1.el6.x86_64.rpm                                                                                                                                                                       |  39 kB     00:00
(3/6): libnet-1.1.5-1.el6.x86_64.rpm                                                                                                                                                                         |  54 kB     00:00
(4/6): syslog-ng-3.2.5-3.el6.x86_64.rpm                                                                                                                                                                      | 440 kB     00:00
(5/6): syslog-ng-devel-3.2.5-3.el6.x86_64.rpm                                                                                                                                                                |  55 kB     00:00
(6/6): syslog-ng-libdbi-3.2.5-3.el6.x86_64.rpm                                                                                                                                                               |  31 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                               1.0 MB/s | 636 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libnet-1.1.5-1.el6.x86_64                                                                                                                                                                                        1/6
  Installing : eventlog-0.2.12-1.el6.x86_64                                                                                                                                                                                     2/6
  Installing : syslog-ng-3.2.5-3.el6.x86_64                                                                                                                                                                                     3/6
  Installing : libdbi-0.8.3-3.1.el6.x86_64                                                                                                                                                                                      4/6
  Installing : syslog-ng-libdbi-3.2.5-3.el6.x86_64                                                                                                                                                                              5/6
  Installing : syslog-ng-devel-3.2.5-3.el6.x86_64                                                                                                                                                                               6/6
  Verifying  : libdbi-0.8.3-3.1.el6.x86_64                                                                                                                                                                                      1/6
  Verifying  : syslog-ng-devel-3.2.5-3.el6.x86_64                                                                                                                                                                               2/6
  Verifying  : syslog-ng-libdbi-3.2.5-3.el6.x86_64                                                                                                                                                                              3/6
  Verifying  : syslog-ng-3.2.5-3.el6.x86_64                                                                                                                                                                                     4/6
  Verifying  : eventlog-0.2.12-1.el6.x86_64                                                                                                                                                                                     5/6
  Verifying  : libnet-1.1.5-1.el6.x86_64                                                                                                                                                                                        6/6

Installed:
  syslog-ng.x86_64 0:3.2.5-3.el6                                         syslog-ng-devel.x86_64 0:3.2.5-3.el6                                         syslog-ng-libdbi.x86_64 0:3.2.5-3.el6

Dependency Installed:
  eventlog.x86_64 0:0.2.12-1.el6                                               libdbi.x86_64 0:0.8.3-3.1.el6                                               libnet.x86_64 0:1.1.5-1.el6

Complete!
■手順16)syslog-ngの設定ファイルの編集
#
sudo vi /etc/syslog-ng/syslog-ng.conf
#HAProxy
source s_all {
       udp();                    # remote logs arriving at 514/udp
       unix-stream("/dev/log");  # local system logs
       file("/proc/kmsg");       # local kernel logs
       internal();               # internal syslog-ng logs
};
 
destination df_haproxy { file("/var/log/haproxy.log"); };
 
filter f_haproxy { facility(local7); };
 
log {
        source(s_all);
        filter(f_haproxy);
        destination(df_haproxy);
};
■手順17)設定の確認
#
sudo syslog-ng -s
■手順18)起動する
#
sudo /etc/init.d/syslog-ng restart
syslog-ng を停止中:                                        [失敗]
syslog-ng を起動中:                                        [  OK  ]
■手順19)ログローテーションを設定する
sudo vi /etc/logrotate.d/haproxy
/var/log/haproxy.log {
    daily
    rotate 10
    missingok
    notifempty
    compress
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
        /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}
■手順20)自動起動設定を行う
#自動起動設定
chkconfig --add haproxy
#
chkconfig haproxy on
#
/sbin/chkconfig --list haproxy
haproxy         0:off   1:off   2:on    3:on    4:on    5:on    6:off
インストールは以上です(`・ω・´)ゞビシッ!!

■停止されている状態から、復旧するとヘルスチェックで自動で復旧する( ̄ー ̄)bグッ!
Mar  3 22:40:20 127.0.0.1 haproxy[10063]: Stopping proxy mysql-slave in 0 ms.
Mar  3 22:40:20 127.0.0.1 haproxy[10063]: Proxy mysql-slave stopped (FE: 5 conns, BE: 5 conns).
Mar  3 22:40:27 127.0.0.1 haproxy[10216]: Proxy mysql-slave started.
Mar  3 22:40:27 127.0.0.1 haproxy[10216]: Health check for server mysql-slave/slave1 failed, reason: Layer7 wrong status, code: 0, info: "Access denied for user 'haproxy'@'192.168.0.25' (using password: NO)", check duration: 0ms, status: 0/2 DOWN.
Mar  3 22:40:27 127.0.0.1 haproxy[10216]: Server mysql-slave/slave1 is DOWN. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Mar  3 22:40:27 127.0.0.1 haproxy[10216]: proxy mysql-slave has no server available!
Mar  3 22:41:48 127.0.0.1 haproxy[10217]: Health check for server mysql-slave/slave1 succeeded, reason: Layer7 check passed, code: 0, info: "5.5.30-log", check duration: 0ms, status: 1/2 DOWN.
Mar  3 22:41:49 127.0.0.1 haproxy[10217]: Health check for server mysql-slave/slave1 succeeded, reason: Layer7 check passed, code: 0, info: "5.5.30-log", check duration: 0ms, status: 3/3 UP.
Mar  3 22:41:49 127.0.0.1 haproxy[10217]: Server mysql-slave/slave1 is UP. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
■再起動をせずに設定を反映させる方法( ̄ー ̄)bグッ!
#既に動いているhaproxyのpidを確認
# cat /var/run/haproxy.pid
8811
#-sfの後ろに先程確認した数値を設定して実行する
/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -sf 8811

参考URL

0 件のコメント:

コメントを投稿