centOS 6.5 安装 keepalived

1.安装openssl

下载  请自行官网下载 http://www.openssl.org/source/

./config

make

make install


2.安装安装 keepalived

下载  请自行官网下载 http://www.keepalived.org/download.html

./configure --prefix=/usr/local/keepalived

报错了:

checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
configure: error: 
!!! OpenSSL is not properly installed> 
!!! Can not include OpenSSL headers files.

因为在这个环境安装keepalived 还需要 openssl-devel  !!!


解决办法:

3.安装 openssl-devel
yum -y install openssl-devel*




服务器上不了外网!!!!!
那就离线装吧

4.离线安装 openssl-devel

下载url:openssl-devel下载

(http://download.csdn.net/detail/wujiandao001/9487765)


下面命令很重要!之前按一个博客操作 把libselinux 这个基础库删了,  ls rpm  vi vim 等基本命令都不能用了。折腾了很长时间才恢复了。


然后在解压文件夹执行:

rpm -e --nodeps keyutils-libs-1.4-4.el6.x86_64
rpm -ivh keyutils-libs-1.4-5.el6.x86_64.rpm
rpm -ivh keyutils-libs-devel-1.4-5.el6.x86_64.rpm
rpm -ivh libsepol-devel-2.0.41-4.el6.x86_64.rpm
rpm -e --nodeps libselinux-utils-2.0.94-5.3.el6_4.1.x86_64
rpm -Uvh libselinux-2.0.94-5.8.el6.x86_64.rpm
rpm -ivh libselinux-devel-2.0.94-5.8.el6.x86_64.rpm
rpm -e --nodeps krb5-libs-1.10.3-10.el6_4.6.x86_64
rpm -ivh krb5-libs-1.10.3-42.el6.x86_64.rpm
rpm -e --nodeps libcom_err-1.41.12-18.el6.x86_64
rpm -ivh libcom_err-1.41.12-22.el6.x86_64.rpm
rpm -ivh libcom_err-devel-1.41.12-22.el6.x86_64.rpm
rpm -ivh krb5-devel-1.10.3-42.el6.x86_64.rpm
rpm -ivh zlib-devel-1.2.3-29.el6.x86_64.rpm
rpm -e --nodeps openssl-1.0.1e-15.el6.x86_64
rpm -ivh openssl-1.0.1e-42.el6.x86_64.rpm
rpm -ivh openssl-devel-1.0.1e-42.el6.x86_64.rpm


5.安装 keepalived

./configure --prefix=/usr/local/keepalived            

make

make install

这次成功了!


和nginx 一块使用的具体配置 请看下一节:

nginx + keepalived 实现热备负载





你可能感兴趣的:(并发)