How to intall and configure Haproxy on Centos
- Install Haproxy
CentOS/RHEL 5 , 32 bit:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
CentOS/RHEL 5 , 64 bit:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
CentOS/RHEL 6 , 32 bit:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
CentOS/RHEL 6 , 64 bit:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install haproxy - Configure Haproxy
vi /etc/haproxy/haproxy.cfgglobal
log 127.0.0.1 local0
log 127.0.0.1 local1 debug
maxconn # Total Max Connections.
daemon
nbproc # Number of processing cores.
defaults
log global
mode http
option httplog
option dontlognull
retries
option redispatch
maxconn
timeout server
timeout connect
timeout client
timeout queue 1000s # [HTTP Site Configuration]
listen http_web 10.10.0.112:
mode http
balance roundrobin # Load Balancing algorithm
option httpchk
option forwardfor
server server1 23.253.48.253: weight maxconn check
server server2 208.43.40.162: weight maxconn check # [Change HAProxy Stats URL]
listen stats 10.10.0.112:
mode http
log global
balance roundrobin maxconn timeout server
timeout connect
timeout client
timeout queue 1000s stats enable
stats hide-version
stats refresh 30s
stats show-node
stats realm Haproxy\ Statistics
stats auth admin:password
stats uri /ha-statshaproxy Code
开启防火墙 1936 端口
- 重启相关服务
service iptables restart
service haproxy restart
chkconfig haproxy on - 后台查看网站:
http://10.10.0.112:1936/ha-stats or http://10.10.0.112:1936/stats - 参考链接:
http://tecadmin.net/install-and-configure-haproxy-on-centos/
How to intall and configure Haproxy on Centos的更多相关文章
- Configure Ocserv on CentOS 6
Configure Ocserv on CentOS 6 Table of Contents 1. Install ocserv 2. Configure ocserv 3. How to host ...
- [scrapy-redis] install and configure scrapy-redis on CentOS 7 (1)
0. 安装依赖 yum install -y zlib zlib-devel openssl openssl-devel bzip2 bzip2-devel sqlite-devel gcc wget ...
- haproxy 在centos上cannot bind 端口的问题
setsebool -P haproxy_connect_any=1 要不把selinux干掉也行
- IP Failover Setup using Keepalived on CentOS/Redhat 6
source url:http://tecadmin.net/ip-failover-setup-using-keepalived-on-centos-redhat-6/ Keepalived is ...
- Centos7 编译安装 Nginx PHP Mariadb Memcached 扩展 ZendOpcache扩展 (实测 笔记 Centos 7.3 + Mariadb 10.1.20 + Nginx 1.10.2 + PHP 7.1.0 + Laravel 5.3 )
环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7-x86_64-Minimal-1611.iso 安装步骤: 1.准备 1.0 查看硬 ...
- Cenos7 编译安装 Mariadb Nginx PHP Memcache ZendOpcache (实测 笔记 Centos 7.0 + Mariadb 10.0.15 + Nginx 1.6.2 + PHP 5.5.19)
环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7.0-1406-x86_64-DVD.iso 安装步骤: 1.准备 1.1 显示系统版 ...
- Configuring Network in CentOS 6.3 Virtual Box + Screenshots
Configuring Network in CentOS 6.3 Virtual Box + Screenshots Posted: May 23, 2013 in Uncategorized Ta ...
- 编译安装LNMP Centos 6.5 x64 + Nginx1.6.0 + PHP5.5.13 + Mysql5.6.19
(来自:http://www.cnblogs.com/vicowong/archive/2011/12/01/2116212.html) 环境: 系统硬件:vmware vsphere (CPU:2* ...
- Centos7 编译安装 Nginx PHP Mariadb Memcache扩展 ZendOpcache扩展 (实测 笔记 Centos 7.0 + Mariadb 10.1.9 + Nginx 1.9.9 + PHP 5.5.30)
环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7-x86_64-Minimal-1503-01.iso 安装步骤: 1.准备 1.1 ...
随机推荐
- Factors of Factorial AtCoder - 2286 (N的阶乘的因子个数)(数论)
Problem Statement You are given an integer N. Find the number of the positive divisors of N!, modulo ...
- sql 表值函数与标量值函数
写sql存储过程经常需要调用一些函数来使处理过程更加合理,也可以使函数复用性更强,不过在写sql函数的时候可能会发现,有些函数是在表值函数下写的有些是在标量值下写的,区别是表值函数只能返回一个表,标量 ...
- tomcat redis 集群 session共享
jcoleman/tomcat-redis-session-manager: Redis-backed non-sticky session store for Apache Tomcathttps: ...
- Zabbix appliance manual
https://www.zabbix.com/documentation/4.0/manual/appliance If the appliance fails to start up in Hype ...
- JEECG&JWT异常捕获强化处理 | Java: Meaning of catch (final SomeException e)?
//从header中得到token String authHeader = request.getHeader(JwtConstants.AUTHORIZATION); if (authHeader ...
- vmware can not be closed virtual machine is busy
VMware does not close when Windows Server 2003 ... |VMware Communities https://communities.vmware.co ...
- Python + selenium + pycharm 环境部署细节 和selenium、Jenkins简单介绍
一.测试体系:Python + selenium + pycharm + Jenkins/docker 环境搭建: 1.安装python 3.4/3.5 2/3.6/ 3.7 2.配置环境变量 3.p ...
- 1 Expression of Possiblity
Expression of possibility Probably Perhaps There's a change(that) It's very likly(that) It's pos ...
- <转>Python中的新式/经典类的查找方式
在学习到深度和广度的时候,懵了很久.后来看到这篇文章,恍然大悟.写的很好.特意转过来. 经典类: 只要有父类, 就会沿着一直找, 即使已经找过了~ 新式类: 在类继承的多个类拥有共同父类的情况下, 会 ...
- 当mysql报错1045时的解决方法
2.用记事本打开 添加 打开后,搜索mysqld关键字 找到后,在mysqld下面添加skip-grant-tables,保存退出. 如果保存在了c盘里不能修改那么就采用这样的方法 然后就可以修改c盘 ...