【haproxy-1.5.0安装】

[root@master ~]# cd /opt/

[root@master opt]# clear

[root@master opt]# ls

alibaba-rocketmq     grafana-2.5.0   httpd-2.2.23.tar.gz      mongodb-linux-x86_64-1.6.3.tgz  

php-5.4.10.tar.gz      zookeeper-3.4.6.tar.gz       alibaba-rocketmq-3.2.6.tar.gz     

grafana-2.5.0.linux-x64.tar.gz        libevent-1.4.14b-stable     nagios    solr-6.2.0

apache-activemq-5.8.0      hadoop   libevent-1.4.14b-stable.tar.gz  nagios-3.4.3.tar.gz

solr-6.2.0.tgz      apache-activemq-5.8.0-bin.tar.gz      hadoop_data    memcached     

nagios-plugins-1.4.13  SRC     cacti-0.8.8b.tar.gz     haproxy-1.5.0.tar.gz            

memcached-1.4.25.tar.gz  nagios-plugins-1.4.13.tar.gz    tomcat   flume1.6   

httpd-2.2.23     mongodb  php-5.4.10   zookeeper-3.4.6


【haproxy-1.5.0安装】_第1张图片
 
【haproxy-1.5.0安装】_第2张图片
 

[root@master opt]# tar -zxvf haproxy-1.5.0.tar.gz 

[root@master haproxy-1.5.0]# make

 

Due to too many reports of suboptimized setups, building without

specifying the target is no longer supported. Please specify the

target OS in the TARGET variable, in the following form:

 

   make TARGET=xxx

 

Please choose the target among the following supported list :

 

   linux2628, linux26, linux24, linux24e, linux22, solaris

   freebsd, openbsd, cygwin, custom, generic

 

Use "generic" if you don't want any optimization, "custom" if you

want to precisely tweak every option, or choose the target which

matches your OS the most in order to gain the maximum performance

out of it. Please check the Makefile in case of doubts.

 

make: *** [all] Error 1

[root@master haproxy-1.5.0]# uname -a

Linux master 2.6.18-128.el5 #1 SMP Wed Jan 21 10:41:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

[root@master haproxy-1.5.0]# make TARGET=linux2628

src/listener.o: In function `listener_accept':

/opt/haproxy-1.5.0/src/listener.c:369: undefined reference to `accept4'

collect2: ld returned 1 exit status

make: *** [haproxy] Error 1

[root@master haproxy-1.5.0]# uname -a

Linux master 2.6.18-128.el5 #1 SMP Wed Jan 21 10:41:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

[root@master haproxy-1.5.0]# make

 

Due to too many reports of suboptimized setups, building without

specifying the target is no longer supported. Please specify the

target OS in the TARGET variable, in the following form:

 

   make TARGET=xxx

 

Please choose the target among the following supported list :

 

   linux2628, linux26, linux24, linux24e, linux22, solaris

   freebsd, openbsd, cygwin, custom, generic

 

Use "generic" if you don't want any optimization, "custom" if you

want to precisely tweak every option, or choose the target which

matches your OS the most in order to gain the maximum performance

out of it. Please check the Makefile in case of doubts.

 

make: *** [all] Error 1

[root@master haproxy-1.5.0]# make TARGET=linux26

gcc  -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/payload.o src/hash.o src/pattern.o src/map.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 

src/listener.o: In function `listener_accept':

/opt/haproxy-1.5.0/src/listener.c:369: undefined reference to `accept4'

collect2: ld returned 1 exit status

make: *** [haproxy] Error 1

[root@master haproxy-1.5.0]# makeclean

-bash: makeclean: command not found

[root@master haproxy-1.5.0]# make clean

rm -f *.[oas] src/*.[oas] ebtree/*.[oas] haproxy test

for dir in . src include/* doc ebtree; do rm -f $dir/*~ $dir/*.rej $dir/core; done

rm -f haproxy-1.5.0.tar.gz haproxy-1.5.0.tar.gz

rm -f haproxy-1.5.0 haproxy-1.5.0 nohup.out gmon.out

rm -f haproxy-systemd-wrapper

[root@master haproxy-1.5.0]# make TARGET=generic

gcc  -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/payload.o src/hash.o src/pattern.o src/map.o src/ev_poll.o ebtree/ebtree.o ebtree/eb32tree.o ebtree/eb64tree.o ebtree/ebmbtree.o ebtree/ebsttree.o ebtree/ebimtree.o ebtree/ebistree.o   

 

[root@master haproxy-1.5.0]# make install

gcc -Iinclude -Iebtree -Wall  -O2 -g -fno-strict-aliasing       -DENABLE_POLL  -DCONFIG_HAPROXY_VERSION=\"1.5.0\" -DCONFIG_HAPROXY_DATE=\"2014/06/19\" \

              -DSBINDIR='"/usr/local/sbin"' \

               -c -o src/haproxy-systemd-wrapper.o src/haproxy-systemd-wrapper.c

gcc  -g -o haproxy-systemd-wrapper src/haproxy-systemd-wrapper.o   

install -d /usr/local/sbin

install haproxy /usr/local/sbin

install haproxy-systemd-wrapper /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

[root@master haproxy-1.5.0]# ls

CHANGELOG  contrib  doc  ebtree  examples  haproxy  haproxy-systemd-wrapper  include  LICENSE  Makefile  README  ROADMAP  src  SUBVERS  tests  VERDATE  VERSION

[root@master haproxy-1.5.0]# cd contrib/

[root@master contrib]# ls

base64  halog  ip6range  iprange  netsnmp-perl  selinux  systemd  trace

[root@master contrib]# cd ../

[root@master haproxy-1.5.0]# haproxy

HA-Proxy version 1.5.0 2014/06/19

Copyright 2000-2014 Willy Tarreau

 

Usage : haproxy [-f ]* [ -vdVD ] [ -n ] [ -N ]

        [ -p ] [ -m ] [ -C

]

        -v displays version ; -vv shows known build options.

        -d enters debug mode ; -db only disables background mode.

        -dM[] poisons memory with (defaults to 0x50)

        -V enters verbose mode (disables quiet mode)

        -D goes daemon ; -C changes to

before loading files.

        -q quiet mode : don't display messages

        -c check mode : only check config files and exit

        -n sets the maximum total # of connections (2000)

        -m limits the usable amount of memory (in MB)

        -N sets the default, per-proxy maximum # of connections (2000)

        -L set local peer name (default to hostname)

        -p writes pids of all children to this file

        -dp disables poll() usage even when available

        -dV disables SSL verify on servers side

        -sf/-st [pid ]* finishes/terminates old pids. Must be last arguments.


【haproxy-1.5.0安装】_第3张图片
 
【haproxy-1.5.0安装】_第4张图片
 

[root@master haproxy-1.5.0]# 

你可能感兴趣的:(HAProxy简介)