Linux安装keepalived
2021/8/14 7:07:13
本文主要是介绍Linux安装keepalived,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
第一步:先安装依赖包 yum install -y libselinux-devel openssl-devel krb5-devel
第二步:在官网下载安装包:https://www.keepalived.org/download.html
第三步:把安装包传上服务器,解压。
第四步:进入解压的文件夹,编译安装 ./configure --prefix=/software/keepalived
//没有权限的话用sudo或者root,但我在make install 时 在/usr/lib/systemd/system下创建文件时sudo还是不够权限,所以只能用root
第五步:make && make install
第六步:cp /software/tools/keepalived-2.2.2/keepalived/etc/init.d/keepalived /etc/init.d
第七步:创建文件夹 mkdir /etc/keepalived
第八步:cp /software/tools/keepalived-2.2.2/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
cp /software/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/
cp /software/keepalived/sbin/keepalived /usr/sbin/
第九步:启动keepalived:systemctl start keepalived
查看状态 systemctl status keepalived
如果起不来 检查下网卡名称是否一致,如果不对,请修改一致:
cd /etc/sysconfig/network-scripts/ifcfg-ens160
vi /etc/keepalived/keepalived.conf
这篇关于Linux安装keepalived的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-12-18git仓库有更新,jenkins 自动触发拉代码怎么配置的?-icode9专业技术文章分享
- 2024-12-18Jenkins webhook 方式怎么配置指定的分支?-icode9专业技术文章分享
- 2024-12-13Linux C++项目实战入门教程
- 2024-12-13Linux C++编程项目实战入门教程
- 2024-12-11Linux部署Scrapy教程:新手入门指南
- 2024-12-11怎么将在本地创建的 Maven 仓库迁移到 Linux 服务器上?-icode9专业技术文章分享
- 2024-12-10Linux常用命令
- 2024-12-06谁看谁服! Linux 创始人对于进程和线程的理解是…
- 2024-12-04操作系统教程:新手入门及初级技巧详解
- 2024-12-04操作系统入门:新手必学指南