keepalived 安装教程

seo优化 admin 11个月前 (03-29) 188次浏览 已收录 0个评论

1、安装keepalived
访问Keepalived官网(http://www.keepalived.org)下载软件包,并上传到服务器上。
或者直接用命令下载并解压:
[root@localhost ~]# tar zxvf keepalived-1.3.4.tar.gz
安装依赖插件:

[root@localhost ~]# yum install -y gcc openssl-devel popt-devel

编译安装:

[root@localhost ~]# cd keepalived-1.3.4

[root@localhost keepalived-1.3.4]# ./configure –prefix=/usr/local/keepalived

[root@localhost keepalived-1.3.4]# make && make install

配置:(后面部分会详细介绍,这里就用默认配置)

启动:
首先拷贝几个文件到CentOS7环境中:

[root@localhost ~]# cp keepalived-1.3.4/keepalived/etc/init.d/keepalived /etc/init.d/

[root@localhost ~]# mkdir /etc/keepalived

[root@localhost ~]# cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/

[root@localhost ~]# cp keepalived-1.3.4/keepalived/etc/sysconfig/keepalived /etc/sysconfig/

[root@localhost ~]# cp /usr/local/keepalived/sbin/keepalived /usr/sbin/

执行启动服务:
[root@localhost ~]# service keepalived start


华仔博客 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:keepalived 安装教程
喜欢 (0)
[]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址