리눅스

Total 331
Today 0
profile_image
슈퍼아이피
17-04-21 14:07 0개 19회
설치문서
우분투에 haproxy 설치하기

L7 로드발란서 HAProxy 설치하기

설치 환경 : 우분투 14.04 64bit

  1. HAProxy 다운로드
    1. 다운로드 주소 보기 : http://www.haproxy.org/#down
    2. 현재 최신버전 1.6.4 주소 : http://www.haproxy.org/download/1.6/src/haproxy-1.6.4.tar.gz

        
      Resolving www.haproxy.org (www.haproxy.org)... 195.154.117.1612001:7a8:363c:2::2
      Connecting to www.haproxy.org (www.haproxy.org)|195.154.117.161|:80... connected.
      HTTP request sent, awaiting response... 200 OK
      Length: 1559276 (1.5M) [application/x-gzip]
      Saving to: ‘haproxy-1.6.4.tar.gz’
       
      100%[======================================>] 1,559,276    206KB/s   in 11s    u
       
      2016-05-03 14:00:56 (139 KB/s) - ‘haproxy-1.6.4.tar.gz’ saved [1559276/1559276]
    3. 압축 해제 : $ tar zxvf haproxy-1.6.4.tar.gz

  2. make로 컴파일 하기

    1. 압축 해제후 README 파일을 열어보면 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, 3.x, and above (enables splice and tproxy)
      - solaris for Solaris 8 or 10 (others untested)
      - freebsd for FreeBSD 5 to 10 (others untested)
      - netbsd for NetBSD
      - osx for Mac OS/X
      - openbsd for OpenBSD 3.1 and above
      - aix51 for AIX 5.1
      - aix52 for AIX 5.2
      - cygwin for Cygwin
      - generic for any other OS or version.
      - custom to manually adjust every setting

    2. 리눅스 버전 확인하기

      $ uname -a
      Linux ip-172-31-23-15 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    3. 컴파일하기. 

      1. 나는 3.13.0 이므로 TARGET=linux2628을 지정

      2. USE_PCRE : 펄 호환 정규 표현식을 사용할 경우 USE_PCRE=1
      3. USE_OPENSSL : SSL을 이용할 경우 USE_OPENSSL=1, 이 옵션을 주지 않으면 https를 사용할 수 없음
      4. USE_ZLIB : http 압축을 이용할 경우 USE_ZLIB=1

      5. make 설치 : sudo apt-get install make

      6. gcc 설치 : sudo apt-get install gcc

      7. pcre 설치 : sudo apt-get install libpcre3-dev
      8. openssl 설치 : sudo apt-get install libssl-dev openssl

        $ make TARGET=linux2628 USE_PCRE=1 USE_OPENSSL=1 

댓글목록

등록된 댓글이 없습니다.