首页 > 代码库 > haproxy

haproxy

 

[root@ha01 haproxy-1.4.26]# uname -a
Linux ha01 2.6.32-573.el6.x86_64 #1 SMP Thu Jul 23 15:44:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@ha01 haproxy-1.4.26]# make TARGET=linux26 ARCH=x86_64 PREFIX=/apps/haproxy-1.4.26
gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DENABLE_SEPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.4.26\" -DCONFIG_HAPROXY_DATE=\"2015/01/30\" \
          -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
make: gcc: Command not found
make: *** [src/haproxy.o] Error 127
[root@ha01 haproxy-1.4.26]# yum install gcc -y
[root@ha01 haproxy-1.4.26]# make TARGET=linux26 ARCH=x86_64 prefix=/apps/haproxy-1.4.26
#TARGET=linux26,ARCH=x86_64
#TARGET是指内核版本,ARCH指定CPU架构
[root@ha01 haproxy-1.4.26]# make install PREFIX=/apps/haproxy-1.4.26
[root@ha02 haproxy-1.4.26]# tree /apps/
/apps/
└── haproxy-1.4.26
    ├── doc
    │   └── haproxy
    │       ├── architecture.txt
    │       ├── configuration.txt
    │       ├── haproxy-en.txt
    │       └── haproxy-fr.txt
    ├── sbin
    │   └── haproxy
    └── share
        └── man
            └── man1
                └── haproxy.1
[root@ha02 haproxy-1.4.26]# cp examples/haproxy.cfg /apps/haproxy-1.4.26/
[root@ha02 haproxy-1.4.26]# pwd
/usr/local/src/haproxy-1.4.26

 

haproxy