当前位置:   article > 正文

CentOS 7离线安装Keepalived_centos离线安装keepalive

centos离线安装keepalive

安装keepalived的相关依赖

如果嫌麻烦,可以直接下载keepalived压缩包
积分不够的话需在https://pkgs.org/下载如下依赖:
keepalived依赖
下载所有依赖之后,将其上传到服务器,然后在依赖所在文件夹内执行rpm -Uvh --force *.rpm即可

安装keepalived

/home/install_package/keepalived为例
1、将keepalived-2.0.10.tar.gz上传到/home/install_package/keepalived
2、在文件夹下执行tar -zxvf keepalived-2.0.10.tar.gz解压安装包
3、在文件夹下执行mkdir vip创建编译路径
4、cd keepalived-2.0.10后执行./configure --prefix=/home/install_package/keepalived/vip进行编译
5、之后执行make && make install,执行完毕后,进入/home/install_package/keepalived/vip可以看到:
编译后效果图
6、最后在/home/install_package/keepalived执行以下命令

# cp keepalived-2.0.10/keepalived/etc/init.d/keepalived /etc/init.d/
# cp keepalived-2.0.10/keepalived/etc/sysconfig/keepalived  /etc/sysconfig/
# cp vip/sbin/keepalived  /usr/local/sbin/
# mkdir /etc/keepalived
# cp vip/etc/keepalived/keepalived.conf /etc/keepalived/
  • 1
  • 2
  • 3
  • 4
  • 5

启动keepalived

执行systemctl start keepalived,随后执行systemctl status keepalived可以看到:
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/351924
推荐阅读
相关标签
  

闽ICP备14008679号