首页 > 代码库 > keepalived 安装

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 安装