HAProxy - ConnectionManager - Openfire
ㅁ make 설치 및 확인
# rpm -qa | grep ^make
# yum info make | grep Repo
# yum install make -y
ㅁ haproxy 설치
[
ssl 사용할 경우 USE_OPENSSL=1
- 32 but
# make TARGET=linux26 ARCH=x86
- 64 bit
# make TARGET=linux26 ARCH=x86_64
]
# make clean
# make TARGET=linux26 USE_OPENSSL=1 ADDLIB=-lz
# make install
# cp ./examples/haproxy.init /etc/rc.d/init.d/haproxy
# chmod 755 /etc/rc.d/init.d/haproxy
# mkdir -p /etc/haproxy
# cp ./examples/haproxy.cfg /etc/haproxy/
# mkdir -p /etc/haproxy/errors
# cp ./examples/errorfiles/* /etc/haproxy/errors/
# cd /usr/sbin
# ln -s /usr/local/sbin/haproxy haproxy
# mkdir /ust/share/haproxy
ㅁ 구동
#sudo service haproxy start
ㅁ 설정 변경
- cm-proxy 의 포트는 HAProxy 가 받을 포트
- connection-manager 추가 해준다.
#vi /etc/haproxy/haproxy.cfg
ㅁ maxconn 추가
> ulimit -n 관계있음. ulimit 수정 필요
# this config needs haproxy-1.1.28 or haproxy-1.2.1 global defaults timeout connect 5d #backend http_backend listen cm-proxy 0.0.0.0:5222 |
ㅁ manager 접속
- http://domain.com:8081/haproxy_stats
ㅁ 3개의 클라이언트 접속 분배.