标签:usr plog 内容 path stat ice direct mail dip
VIP1:10.90.11.196
VIP2:10.90.11.195
DIP1:10.90.11.96
DIP2:10.90.11.95
keepalived部署
Director1、Director2:
yum install keepalived -y
vim /etc/keepalived/keepalived.conf
10.90.11.96
|
10.90.11.95
|
---|---|
global_defs {
vrrp_instance VI_2 { |
global_defs {
virtual_ipaddress { vrrp_instance VI_2 { |
启动keepalived
/etc/init.d/keepalived start
部署haproxy
director1、director2:
安装haproxy:
wget http://pkgs.fedoraproject.org/repo/pkgs/haproxy/haproxy-1.6.9.tar.gz/c52eee40eb66f290d6f089c339b9d2b3/haproxy-1.6.9.tar.gz
tar zxf haproxy-1.6.9.tar.gz -C /usr/local/
cd /usr/local/haproxy-1.6.9
make TARGET=linux2628 ARCH=x86_64 PREFIX=/usr/local/haproxy
make install PREFIX=/usr/local/haproxy
修改配置文件:
vim /usr/local/haproxy/haproxy.cfg
global listen tcptest |
---|
启动
/usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg
重启
/usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg -st `cat /usr/local/haproxy/haproxy.pid`
停止
killall haproxy
将haproxy加入到系统服务中。脚本内容如下
vim /etc/init.d/haproxy
脚本内容如下:
|
---|
#! /bin/sh #PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/haproxy/sbin # Gracefully exit if the package has been removed. start() stop() restart() case "$1" in exit 0 |
标签:usr plog 内容 path stat ice direct mail dip
原文地址:https://www.cnblogs.com/sailq21/p/9299145.html