赞
踩
如果嫌麻烦,可以直接下载keepalived压缩包
积分不够的话需在https://pkgs.org/下载如下依赖:
下载所有依赖之后,将其上传到服务器,然后在依赖所在文件夹内执行rpm -Uvh --force *.rpm
即可
以/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/
执行systemctl start keepalived
,随后执行systemctl status keepalived
可以看到:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。