Server Deployment - Haproxy
I will install the latest package in my system. I use it as software solution of hardware F5.
1. Install haproxy
download this file haproxy-1.4.15.tar.gz
unzip the file
>tar zxvf haproxy-1.4.15.tar.gz
move the file to work directory
>mv /home/luohua/soft_bak/haproxy-1.4.15 /home/luohua/tools/
>cd /home/luohua/tools/haproxy-1.4.15
compile the make file and install
>make TARGET=linux26
>make install
2. my configuration file, haproxy.conf:
global
daemon
maxconn 256
log 127.0.0.1 local0
debug
#quiet
defaults
log 127.0.0.1 local3
mode http
option httplog
option httpclose
option dontlognull
option forwardfor
option redispatch
retries 2
maxconn 2000
balance roundrobin
stats uri /haproxy-stats
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
listen web_proxy 0.0.0.0:82
option httpchk GET /easymarket/index.jsp
server s1 127.0.0.1:8083 weight 3 check
server s2 127.0.0.1:8084 weight 3 check
server s3 127.0.0.1:8085 weight 3 check
3. command to start the server
>haproxy -f haproxy.conf
I met a problem said:
Starting proxy web_proxy: cannot bind socket
my solution:
>vi /etc/sysctl.conf
net.ipv4.ip_nonlocal_bind=1
and start the haproxy with root or
>sudo haproxy -f haproxy.conf
4. We can see the status of this server on URL:
http://localhost:82/haproxy-stats
http://localhost:82/easymarket
references:
http://hi.baidu.com/luohuazju/blog/item/5d8e2d3eb723eef3828b1312.html
http://hi.baidu.com/luohuazju/blog/item/f74f7ac4e94a97a08226ac14.html
分享到:
相关推荐
Lync-Server-2010-RTM-Standard-Edition-Deployment-Document.pdf
Lync-Server-2010-RTM-Enterprise-Edition-Deployment-Document.pdf
Black Belt HyperFlex Deployment - Stage1 是思科在2019年6月为合作伙伴推出的一项高级认证考试。这个题库是针对那些希望深入理解和熟练掌握HyperFlex解决方案部署的专业人士所设计的。HyperFlex是思科的一种超融合...
本文将深入探讨如何使用"alfresco-deployment-484-2.9.3B.jar.zip"这个压缩包进行Alfresco的部署,以及其中的"alfresco-deployment-484-2.9.3B.jar"文件在部署过程中的关键作用。 首先,我们要明确"jar"文件的含义...
**前端开源库-esh-deployment-cloud** 在当前的IT领域,前端开发已经成为互联网产品不可或缺的一部分。随着技术的不断发展,各种前端框架和库层出不穷,极大地提高了开发效率和用户体验。"前端开源库-esh-...
DigitalOcean-Nodejs-Deployment--源码.rar
maven-deployment-linker-1.3-sources.jar
maven-deployment-linker-1.2-sources.jar
maven-deployment-linker-1.1-sources.jar
maven-deployment-linker-1.0-sources.jar
deployment-ucc-service.yml
maven-deployment-linker-1.2.jar
maven-deployment-linker-1.1.jar
maven-deployment-linker-1.0.jar
VMware-View4-Deployment-Guide-Q309.pdf
Accelerate-Deployment-of-Space-Missions-Through-Digitalization (10).pdf
Accelerate-Deployment-of-Space-Missions-Through-Digitalization (7).pdf
Accelerate-Deployment-of-Space-Missions-Through-Digitalization (8).pdf
nexus-deployment-pod.yaml
[RT-CN]Exchange_Deployment-Migration-Hybrid-Mgmt-TechDeck.pptx