keepalived 安装

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了keepalived 安装相关的知识,希望对你有一定的参考价值。

一. 编译安装keepalived

1.1 keepalived的源码获取 

keepalived源码包我们可以到keepalived的官网:http://www.keepalived.org/去下载,

相关说明文档亦可在其官网查看,比如keepalived的使用,相关配置说明,这里演示的版本为:1.3.5

# wget http://www.keepalived.org/software/keepalived-1.3.5.tar.gz

1.2 安装keepalived的依赖包

下载后keepalived源码包后,我们还需要安装keepalived依赖的依赖包,比如:openssl  , popt 

# yum install openssl  openssl-devel  popt popt-devel

1.3 编译,安装keepalived

<--编译安装keepalived-->

# tar zxvf keepalived-1.3.5.tar.gz 

# cd /data/keepalived-1.3.5/

# ./configure \

  --prefix=/data/keepalived \

  --sbindir=/data/keepalived/sbin  

# make 

# make install

<--对keepalived进行相关优化-->

<---拷贝keepalived相关启动命令--->

cp /data/keepalived/keepalived/etc/init.d/keepalived /etc/init.d/

cp /data/keepalived/bin/keepalived /usr/sbin/

cp /data/keepalived/keepalived/etc/sysconfig/keepalived /etc/sysconfig/

mkdir -p /etc/keepalived/

cp /data/keepalived/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf

二:启动keepalived服务

# service keepalived start

如果keepalived已经启动,这时我们就可以查看以下命令查看启动情况:

# service keepalived status   

# ps aux | grep keepalived


本文出自 “梦Dream” 博客,请务必保留此出处http://dreamy.blog.51cto.com/12471447/1944401

以上是关于keepalived 安装的主要内容,如果未能解决你的问题,请参考以下文章

Keepalived概述和安装

Keepalived详解

keepalived安装与配置

【keepalived】keepalived 容器化安装

Keepalived安装和主要配置文件详解

keepalived编译安装