Keepalived 安装

一、首先确保一些核心参数配置正确

修改 /etc/sysctl.conf的如下参数:

net.ipv4.ip_forward=1

net.ipv4.ip_nonlocal_bind = 1
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2

sysctl -p /etc/sysctl.conf

cat /proc/sys/net/ipv4/ip_forward

cat /proc/sys/net/ipv4/ip_nonlocal_bind

cat /proc/sys/net/ipv4/conf/lo/arp_ignore
cat /proc/sys/net/ipv4/conf/lo/arp_announce
cat /proc/sys/net/ipv4/conf/all/arp_ignore
cat /proc/sys/net/ipv4/conf/all/arp_announce

二、在主节点 修改keepalived.conf

global_defs {
notification_email{
[email protected]
}
notification_email_from [email protected]
smtp_server mail.163.com
smtp_connect_timeout 30
router_id LVS_DEVEL
}

vrrp_instance VI_1 {
state MASTER
interface ens33
virtual_router_id 51
priority 100
advert_int 1
mcast_src_ip 192.168.222.132
authentication {
auth_type PASS
auth_pass 8888
}
virtual_ipaddress {
192.168.222.134/24 brd 192.168.222.255 dev ens33 label ens33:vip
}
}

三、在备节点修改keepalived.conf

global_defs {
notification_email{
[email protected]
}
notification_email_from [email protected]
smtp_server mail.163.com
smtp_connect_timeout 30
router_id LVS_DEVEL
}

vrrp_instance VI_1 {
state BACKUP
interface ens33
virtual_router_id 51
priority 100
advert_int 1
mcast_src_ip 192.168.222.133
authentication {
auth_type PASS
auth_pass 8888
}
virtual_ipaddress {
192.168.222.134/24 brd 192.168.222.255 dev ens33 label ens33:vip
}
}

时间: 2024-10-21 02:27:01

Keepalived 安装的相关文章

keepalived安装

Keepalived安装教程 1         外网环境使用yum安装 安装命令:yum install keepalived –y 查看版本:rpm –qa keepalived(只适合yum安装) 2         内网源码安装 1.拷贝包keepalived-1.2.18.tar.gz到/usr/local/src目录下 2.进入/usr/local/src目录,并解压该压缩包 cd /usr/local/src tar –zxvf keepalived-1.2.18.tar.gz 3

MYSQL + MHA +keepalive + VIP安装配置(三)--keepalived安装配置

一.概述 keepalived介绍:Keepalived的作用是检测web服务器的状态,如果有一台web服务器死机,或工作出现故障,Keepalived将检测到,并将有故障的web 服务器从系统中剔除,当web服务器工作正常后Keepalived自动将web服务器加入到服务器群中,这些工作全部自动完成,不需要人工干涉,需要人 工做的只是修复故障的web服务器. 二.环境 ? 1 2 3 vip:192.168.1.203\204 mysql-master:192.168.1.231 mysql-

keepalived安装(个人笔记)

wget http://www.keepalived.org/software/keepalived-1.2.1.tar.gz tar zxf keepalived-1.2.1.tar.gz :cd keepalived-1.2.1: ./configure--with-kernel-dir=/usr/src/kernels/2.6.18-164.el5-i686 &&make&& make install 内核需要查看,,,如果是32位的自行修改 keepalived 解

Keepalived安装与部署

Keepalived安装与部署 1.keepalived工作原理 keepalived是以VRRP协议为实现基础的,VRRP全称VirtualRouter Redundancy Protocol,即虚拟路由冗余协议. 虚拟路由冗余协议,可以认为是实现路由器高可用的协议,即将N台提供相同功能的路由器组成一个路由器组,这个组里面有一个master和多个backup,master上面有一个对外提供服务的vip(该路由器所在局域网内其他机器的默认路由为该vip),master会发组播,当backup收不

Tengine+keepalived 安装配置

Tengine+keepalived 安装配置 测试环境 系统:Centos-6.5-x86_64 主IP:192.168.1.220 备IP:192.168.219 VIP:192.168.1.226 一.安装Tengine 1.1创建目录并下载安装包 mkdir -p /data/ops/{app,packages,scripts} cd /data/ops/packages/ wget http://tengine.taobao.org/download/tengine-2.1.0.tar

Lvs+keepalived安装配置(v1.0)

测试环境 系统:centos6.5_x86_64 主DR IP:192.168.1.216 备DR IP:192.168.1.218 VIP:192.168.1.253/254 real_server1:192.168.1.220 real_server2:192.168.1.219 一.安装ipvsadm 1.1 安装依赖包 yum -y install  libnl-devel  libnl popt popt-static 1.2 下载并安装ipvsadm wget http://www.

keepalived安装与配置,组建高可用服务器

一.准备环境 linux系统:CentOS7 keepalived版本:keepalived-1.3.5.tar.gz keepalived下载地址:http://www.keepalived.org/download.html 在CentOS7系统中安装keepalived(主.从服务器都要安装): 关闭CentOS7防火墙 关闭selinux策略 下载keepalived依赖包gcc.openssl yum install gcc yum install openssl-devel 二.安装

2.Keepalived介绍 (接上keepalived安装配置并测试)

2.Keepalived介绍在这里我们使用Keeplived来实现高可用集群,因为heartbeat在centos6上有一些问题,影响实验效果(切换不及时问题)keepalived通过VRRP(Virtual router redundancy protocl虚拟路由冗余协议)来实现高可用在这个协议里会将多台功能相同的的路由器组成一个小组,这个小组里会有一个master角色和N(N>=)个backup角色.(blacpup备用)master会通过组播的形式向各个backup发送VRRP协议的数据

keepalived安装文档

安装依赖 su - root yum -y install kernel-devel* yum -y install openssl-* yum -y install popt-devel yum -y install lrzsz yum -y install openssh-clients 安装keepalived 上传 1.cd /usr/local 2.rz –y 3.选择keepalived安装文件 解压 tar –zxvf keepalived-1.2.2.tar.gz 重命名 mv

keepalived安装及配置

一.keepalived安装 keepalived是一个检测服务器状态的脚本,在高可用机制上经常可以看到它的身影. 在Linux中安装keepalived: 1.在网上直接下载相应的压缩包,推荐链接 https://www.keepalived.org/software/ ,在这里可以选择自己需要的版本下载 2.将下载后的压缩包解压,如下图 3.进入解压后的文件夹中,执行 ./configure 如果报下图所示警告 解决方案:执行 yum install -y openssl openssl-d