L7 로드발란서 HAProxy 설치하기
설치 환경 : 우분투 14.04 64bit
- HAProxy 다운로드
- 다운로드 주소 보기 : http://www.haproxy.org/#down
현재 최신버전 1.6.4 주소 : http://www.haproxy.org/download/1.6/src/haproxy-1.6.4.tar.gz
$ wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.4.tar.gzHTTP request sent, awaiting response...200OKLength:1559276(1.5M) [application/x-gzip]Saving to: ‘haproxy-1.6.4.tar.gz’100%[======================================>]1,559,276206KB/s in 11s u2016-05-0314:00:56(139KB/s) - ‘haproxy-1.6.4.tar.gz’ saved [1559276/1559276]압축 해제 : $ tar zxvf haproxy-1.6.4.tar.gz
make로 컴파일 하기
- 압축 해제후 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 리눅스 버전 확인하기
$ uname -aLinux ip-172-31-23-153.13.0-74-generic #118-Ubuntu SMP Thu Dec1722:52:10UTC2015x86_64 x86_64 x86_64 GNU/Linux컴파일하기.
나는 3.13.0 이므로 TARGET=linux2628을 지정
- USE_PCRE : 펄 호환 정규 표현식을 사용할 경우 USE_PCRE=1
- USE_OPENSSL : SSL을 이용할 경우 USE_OPENSSL=1, 이 옵션을 주지 않으면 https를 사용할 수 없음
USE_ZLIB : http 압축을 이용할 경우 USE_ZLIB=1
make 설치 : sudo apt-get install make
gcc 설치 : sudo apt-get install gcc
- pcre 설치 : sudo apt-get install libpcre3-dev
openssl 설치 : sudo apt-get install libssl-dev openssl
$ make TARGET=linux2628 USE_PCRE=1USE_OPENSSL=1
- 압축 해제후 README 파일을 열어보면 TARGET를 지정해주라고 나와있음

댓글목록
등록된 댓글이 없습니다.