首页 > 其他分享 >keepalived

keepalived

时间:2023-05-05 17:24:42浏览次数:33  
标签:tar keepalived Keepalived gz cd 2.2

Keepalived安装

环境:两台nginx服务器
img

  1. 下载Keepalived安装包
curl https://www.keepalived.org/software/keepalived-2.2.7.tar.gz -o keepalived-2.2.7.tar.gz -k 
  1. 解压到跟nginx安装包同一个目录下
tar -zxvf keepalived-2.2.7.tar.gz 

img
3. 配置Keepalived,进入keepalived-2.2.7目录下使用以下命令

./configure \
--prefix=/usr/local/keepalived \ 
--sysconf=/etc  
# prefix  安装目录
# sysconf 核心配置文件

img
4. 编译和安装

make
make install
  1. 启动
cd /usr/local/keepalived/
ll
cd sbin/
./keepalived 

img

Keepalived核心配置文件

  1. 查看IP地址
  2. 进入etc/keepalived目录下配置Keepalived.conf文件
cd /etc/keepalived
vim keepalived.conf

修改以下配置
img
3. 启动keepalived,再查看IP地址,可以发现多了一个IP地址,也就是VIP
img

把keepalived注册成为系统服务

标签:tar,keepalived,Keepalived,gz,cd,2.2
From: https://www.cnblogs.com/xiaodunan/p/17374699.html

相关文章

  • keepalived如何手动切换主备
     概述主备部署中使用keepalived可以很方便的实现,安装维护简单,功能稳定。最近在使用过程中有小的发现,记录一下。环境CentOSLinuxrelease7.9.2009(Core)keepalived.x86_641.3.5-19.el7安装配置centos7自带的keepalived版本为1.3.5,直接使用yum安装sudoyuminstallk......
  • Keepalived安装
    环境:两台nginx服务器下载Keepalived安装包curlhttps://www.keepalived.org/software/keepalived-2.2.7.tar.gz-okeepalived-2.2.7.tar.gz-k解压到跟nginx安装包同一个目录下tar-zxvfkeepalived-2.2.7.tar.gz3.配置Keepalived./configure\--prefix=/usr/l......
  • Keepalived+Nginx架构配置
    Keepalived介绍keepalived是一个类似于layer3,4,5交换机制的软件,也就是我们平时说的第3层、第4层和第5层交换。Keepalived的作用是检测web服务器的状态,如果有一台web服务器死机,或工作出现故障,Keepalived将检测到,并将有故障的web服务器从系统中剔除,当web服务器工作正常后Keepa......
  • opengauss高可用之keepalived配置
    一、安装keepalivedyuminstall-ykernel-devel(安装kernerl-devel,目的是给keepalived提供和LVS搭配使用)yuminstall-yopenssl-devel(HTTPS服务的时候要用到此模块)yuminstallgccgcc-c++make-y(提供编译工具)tar-xfkeepalived-2.0.12.tar.gz-C/usr/local/src/c......
  • lvs+keepalived 实现负载均衡与高可用
    参考拓扑结构 1、在两台DirectorServer上安装lvs与keepalivedyum-yinstallkeepalivedipvsadm2、修改两台DirectorServer中/etc/keepalived/keepalived.conf配置文件 global_defs{notification_email{root@localhost#默认......
  • HAProxy + Keepalived实现mycat高可用方案
    在实际项目中,Mycat服务也需要考虑高可用性,如果Mycat所在服务器出现宕机,或Mycat服务故障,需要有备机提供服务,需要考虑Mycat集群。高可用方案我们可以使用HAProxy+Keepalived配合两台Mycat搭起Mycat集群,实现高可用性。HAProxy实现了MyCat多节点的集群高可用和负......
  • MySQL高可用-双主(keepalived)
    生产环境中一台mysql主机存在单点故障,所以我们要确保mysql的高可用性,即两台MySQL服务器如果其中有一台MySQL服务器挂掉后,另外一台能立马接替其进行工作。MySQL的高可用方案一般有如下几种:keepalived+双主,MHA,PXC,MMM,Heartbeat+DRBD等,比较常用的是keepalived+双主,MHA和PXC。本节主......
  • keepalived+nginx ansible部署
    Linux9自动化部署Keepalived+Nginx高可用负载均衡器原创 魏文第 魏文第 2023-03-0619:00 发表于北京收录于合集#linux39个#ansible19个#自动化18个 通常使用负载均衡器(LB)为一组realserver(提供服务的服务器) 分配流量,以实现后端服务的高可......
  • 高可用(keepalived)部署方案
    前言:为了减少三维数据中心可视化管理系统的停工时间,保持其服务的高度可用性。同时部署多套同样的三维可视化系统,让三维数据中心可视化系统同时部署并运行到多个服务器上。同时提供一个虚拟IP,然后外面通过这个虚拟IP来访问三维可视化管理系统,当一台实体服务器挂掉时会自动的切到另......
  • 基于keepalived双vip的MySQL高可用集群
    一、机器准备及IP地址规划ansible2.9.27ip:192.168.1.124prometheus192.168.1.103MySQLRouter8.0.32mysql集群master192.168.1.150slave192.168.1.151slave192.168.1.152延迟备份backup192.168.1.153keepalived集群192.168.1.148192.168.1.149项目名称:基......