Keepalived的安装

系统环境

实验环境:VMware? Workstation 12 Pro 12.0.1 build-3160714

系统平台:Red Hat Enterprise Linux 7 64 位

内核版本:3.10.0-123.el7.x86_64

keepalived版本:Keepalived for Linux - Version 1.2.20



Keepalived的安装过程

1     wget http://www.keepalived.org/software/keepalived-1.2.20.tar.gz

2     tar -zxvf keepalived-1.2.20.tar.gz

3     cd keepalived-1.2.20/

4     ./configure --prefix=/usr/local/keepalived  //指定安装路径

错误信息

1)提示 “!!! OpenSSL is not properly installed on your system. !!!

!!! Can not include OpenSSL headers files.”

需要安装opendevel:yum -y install openssl-devel

2)提示 ”Keepalive popt libraries is required “

需要安装popt:wget http://rpm5.org/files/popt/popt- 1.16 .tar.gz

3)如果configure就提示GCC NO

需要安装gcc : yum -y install gcc

yum install  libnl-devel openssl-devel libnfnetlink-devel gcc ipvsadm  popt-devel  libnfnetlink kernel-devel

编译结果

Keepalived configuration

------------------------

Keepalived version       : 1.2.20                                                  ##version##

Compiler                 : gcc                                                            ##编译工具##

Compiler flags           : -g -O2 -DFALLBACK_LIBNL1                 ##参数##

Extra Lib                : -lssl -lcrypto -lcrypt  -lnl                              ##扩展库##

Use IPVS Framework       : Yes                                                  ##LVS核心代码框架,不使用LVS可以编译时--disable-lvs## 负载均衡模块

IPVS sync daemon support : Yes                                              ##IPVS同步进程,是否开启取决于 IPVS FRAMEWORK###不使用添加参数--disable-lvs-syncd

IPVS use libnl           : Yes                                                         ##是否使用libnl库##

fwmark socket support    : Yes                                                  ##套接字框架##

Use VRRP Framework       : Yes                                               ##VRRP框架,keepalived的核心进程vrrpd##

Use VRRP VMAC            : No                                                   ##VRRP Virtual mac##

Use VRRP authentication  : Yes

SNMP keepalived support  : No

SNMP checker support     : No

SNMP RFCv2 support       : No

SNMP RFCv3 support       : No

SHA1 support             : No

Use Debug flags          : No

libnl version            : 1

Use IPv4 devconf         : No

Use libiptc              : No

Use libipset             : No

5     make && make install

6     ln -s /usr/local/keepalived/sbin/keepalived /usr/bin/keepalived          //将keepalived命令软连接到/usr/bin下

7     cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/keepalived

8     chmod 755 /etc/init.d/keepalived

9     chkconfig keepalived on

10   修改/etc/init.d/keepalived

# Source configuration file (we set KEEPALIVED_OPTIONS there)

. /etc/sysconfig/keepalived

改为:

# Source configuration file (we set KEEPALIVED_OPTIONS there)

. /usr/local/keepalived/etc/sysconfig/keepalived

11    mkdir /etc/keepalived

12    ln -s /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf

13    service keepalived restart

时间: 2024-10-05 06:16:46

Keepalived的安装的相关文章

keepalived编译安装

编译安装keepalived 使用源码先安装keepalived 1.2.6 cd/usr/local/src wget http://www.keepalived.org/software/keepalived-1.2.6.tar.gz tarzxf keepalived-1.2.6.tar.gz cdkeepalived-1.2.6 ./configure--prefix=/usr/local/keepalived make makeinstall 所设keepalived安装到/usr/l

源代码编译MYSQL5.6 环境下的MHA+KEEPALIVED的安装和维护

前    言 摘   要 MHA 是当 master 出现故障,挑选一个 slave 作为新的 master 并构建成新的 主从架构的管理工具.从 master 出现故障到构建成新的主从架构时间是 10-30 秒.在 master 出现故障时可能会出现 slave 同步的数据不一致的现象,此工具 可以自动应用差异的中继日志到其他 slave 上保证数据的一致性. 一.Mha 优点 1.M aster crash 时可以快速的进行故障切换. 9-12 秒内可以检测到 master 故障, 7-10

Keepalived 的安装和配置

keepalived主要用作RealServer的健康状态检查以及LoadBalance主机和BackUP主机之间failover的实现.keepalived主要目的在于,其自身启动一个服务,能够实现工作在双节点或多个节点上,并且可以在内核生效的ipvs规则其中当前持有资源的节点被称为活跃节点,另外的节点被称为备节点被称为 Master/Backup. VRRP(如果有学习过TCP\IP,这一块很好理解): 虚拟路由器冗余协议(VRRP)是一种选择协议,它可以把一个虚拟路由器的责任动态分配到局域

LVS+Nginx(LVS + Keepalived + Nginx安装及配置)

(也可以每个nginx都挂在上所有的应用服务器) nginx大家都在用,估计也很熟悉了,在做负载均衡时很好用,安装简单.配置简单.相关材料也特别多. lvs是国内的章文嵩博士的大作,比nginx被广泛接受还要早7年,并且已经被红帽作为了系统内置软件,可谓很牛了.lvs相对于nginx来说配置上就要相对复杂一些. 但是,有时候我们会看到大牛们分享的经验里面是lvs+nginx作为负载均衡了,一直想不明白这是个什么道理. 为什么会出现两者被同时使用呢?其实,这要从两者的各自优势来说了. nginx用

高性能集群软件Keepalived之安装配置篇

一.Keepalived的安装过程 Keepalived的安装非常简单,下面通过源码编译的方式介绍下Keepalived的安装过程.首先打开Keepalived的官方网址http://www.keepalived.org,从中可以下载到各种版本的Keepalived,这里下载的是keepalived-1.2.12.tar.gz.以操作系统环境Centos6.3为例,Keepalived安装步骤如下: [[email protected] app]#tar zxvf keepalived-1.2.

keepalived+nginx安装配置

软件版本: pcre8.36 ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz keepalived1.2.19 http://www.keepalived.org/software/keepalived-1.2.19.tar.gz nginx1.8.0 http://nginx.org/download/nginx-1.8.0.tar.gz <pre name="code" class=

Percona-XtraDB-Cluster+haproxy+keepalived 编译安装

系统:centos7 192.168.1.55 mysql 端口3306 Percona-XtraDB-Cluster 主节点 192.168.1.56 mysql端口3307 Percona-XtraDB-Cluster+haproxy+keepalived 192.168.1.57 MySQL端口3307 Percona-XtraDB-Cluster+haproxy+keepalived 192.168.4.58/21 vip ip 软件版本:Percona-XtraDB-Cluster-5

RHEL5.5下的Keepalived编译安装

keepalived简介keepalived是一个类似于layer3, 4 & 5交换机制的软件,也就是我们平时说的第3层.第4层和第5层交换.Keepalived的作用是检测web服务器的状态,如果有一台web服务器死机,或工作出现故障,Keepalived将检测到,并将有故障的web服务器从系统中剔除,当web服务器工作正常后Keepalived自动将web服务器加入到服务器群中,这些工作全部自动完成,不需要人工干涉,需要人工做的只是修复故障的web服务器.keepalived下载:下载地址

架构设计:负载均衡层设计方案(7)——LVS + Keepalived + Nginx安装及配置

1.概述 上篇文章<架构设计:负载均衡层设计方案(6)--Nginx + Keepalived构建高可用的负载层>(http://blog.csdn.net/yinwenjie/article/details/47130609) 我们解说了Nginx的故障切换.而且承诺各位读者会尽快解说 LVS + Keepalived + Nginx的安装和配置.在中间由于工作的原因.我又插写了三篇关于zookeeper的原理使用的文章.今天这边文章我们回归主题.为各位读者解说LVS + Keepalive