keeplived离线安装openssl-devel依赖包
由于公司业务并发比较高需要高可用使用LVS keeplived。在linux系统centos6.5版本中安装keeplived时,需要安装penssl-devel依赖包,但是服务器是不允许连接外网(互联网)的,无法使用yum命令进行安装操作,所以本人研究了一下如何在离线状态下安装penssl-devel依赖包。感觉很多坑,所以分享一下个人总结。
在没有安装openssl-devel依赖包时,进行安装keeplived时可能出现的错误信息:
一:提示openssl未正确安装错误信息如下:
configure: error:
!!! OpenSSL is not properly installed on your system. !!!
!!! Can not include OpenSSL headers files. !!!
二:提示OpenSSL MD5库是必需的错误信息如下:
configure: error: OpenSSL MD5 libraries are required
为了查找安装openssl-devel包时所需要的其他依赖包(此步大家可以跳过,直接浏览下一步),本人专门搞了个可以连接外网的服务器,执行yum install -y openssl openssl-devel命令,输出日志如下:
Running Transaction
Updating : libcom_err-1.41.12-23.el6.x86_64 1/32
Updating : libselinux-2.0.94-7.el6.x86_64 2/32
Updating : keyutils-libs-1.4-5.el6.x86_64 3/32
Updating : krb5-libs-1.10.3-65.el6.x86_64 4/32
Installing : libkadm5-1.10.3-65.el6.x86_64 5/32
Updating : libss-1.41.12-23.el6.x86_64 6/32
Updating : openssl-1.0.1e-57.el6.x86_64 7/32
Installing : keyutils-libs-devel-1.4-5.el6.x86_64 8/32
Updating : e2fsprogs-libs-1.41.12-23.el6.x86_64 9/32
Installing : libcom_err-devel-1.41.12-23.el6.x86_64 10/32
Installing : libsepol-devel-2.0.41-4.el6.x86_64 11/32
Installing : libselinux-devel-2.0.94-7.el6.x86_64 12/32
Installing : krb5-devel-1.10.3-65.el6.x86_64 13/32
Installing : zlib-devel-1.2.3-29.el6.x86_64 14/32
Installing : openssl-devel-1.0.1e-57.el6.x86_64 15/32
Updating : e2fsprogs-1.41.12-23.el6.x86_64 16/32
Updating : krb5-workstation-1.10.3-65.el6.x86_64 17/32
Updating : keyutils-1.4-5.el6.x86_64 18/32
Updating : libselinux-python-2.0.94-7.el6.x86_64 19/32
Updating : libselinux-utils-2.0.94-7.el6.x86_64 20/32
Cleanup : krb5-workstation-1.10.3-10.el6_4.6.x86_64 21/32
Cleanup : e2fsprogs-1.41.12-18.el6.x86_64 22/32
Cleanup : openssl-1.0.1e-15.el6.x86_64 23/32
Cleanup : krb5-libs-1.10.3-10.el6_4.6.x86_64 24/32
Cleanup : e2fsprogs-libs-1.41.12-18.el6.x86_64 25/32
Cleanup : libss-1.41.12-18.el6.x86_64 26/32
Cleanup : libselinux-utils-2.0.94-5.3.el6_4.1.x86_64 27/32
Cleanup : libselinux-python-2.0.94-5.3.el6_4.1.x86_64 28/32
Cleanup : keyutils-1.4-4.el6.x86_64 29/32
Cleanup : keyutils-libs-1.4-4.el6.x86_64 30/32
Cleanup : libselinux-2.0.94-5.3.el6_4.1.x86_64 31/32
Cleanup : libcom_err-1.41.12-18.el6.x86_64 32/32
Verifying : e2fsprogs-1.41.12-23.el6.x86_64 1/32
Verifying : krb5-devel-1.10.3-65.el6.x86_64 2/32
Verifying : libcom_err-1.41.12-23.el6.x86_64 3/32
Verifying : krb5-libs-1.10.3-65.el6.x86_64 4/32
Verifying : e2fsprogs-libs-1.41.12-23.el6.x86_64 5/32
Verifying : krb5-workstation-1.10.3-65.el6.x86_64 6/32
Verifying : keyutils-libs-devel-1.4-5.el6.x86_64 7/32
Verifying : libcom_err-devel-1.41.12-23.el6.x86_64 8/32
Verifying : zlib-devel-1.2.3-29.el6.x86_64 9/32
Verifying : keyutils-libs-1.4-5.el6.x86_64 10/32
Verifying : openssl-devel-1.0.1e-57.el6.x86_64 11/32
Verifying : keyutils-1.4-5.el6.x86_64 12/32
Verifying : libselinux-python-2.0.94-7.el6.x86_64 13/32
Verifying : libss-1.41.12-23.el6.x86_64 14/32
Verifying : libsepol-devel-2.0.41-4.el6.x86_64 15/32
Verifying : libselinux-utils-2.0.94-7.el6.x86_64 16/32
Verifying : openssl-1.0.1e-57.el6.x86_64 17/32
Verifying : libkadm5-1.10.3-65.el6.x86_64 18/32
Verifying : libselinux-2.0.94-7.el6.x86_64 19/32
Verifying : libselinux-devel-2.0.94-7.el6.x86_64 20/32
Verifying : e2fsprogs-1.41.12-18.el6.x86_64 21/32
Verifying : libselinux-2.0.94-5.3.el6_4.1.x86_64 22/32
Verifying : openssl-1.0.1e-15.el6.x86_64 23/32
Verifying : libselinux-utils-2.0.94-5.3.el6_4.1.x86_64 24/32
Verifying : libss-1.41.12-18.el6.x86_64 25/32
Verifying : libcom_err-1.41.12-18.el6.x86_64 26/32
Verifying : e2fsprogs-libs-1.41.12-18.el6.x86_64 27/32
Verifying : libselinux-python-2.0.94-5.3.el6_4.1.x86_64 28/32
Verifying : keyutils-libs-1.4-4.el6.x86_64 29/32
Verifying : krb5-libs-1.10.3-10.el6_4.6.x86_64 30/32
Verifying : keyutils-1.4-4.el6.x86_64 31/32
Verifying : krb5-workstation-1.10.3-10.el6_4.6.x86_64 32/32
Installed:
openssl-devel.x86_64 0:1.0.1e-57.el6
Dependency Installed:
keyutils-libs-devel.x86_64 0:1.4-5.el6 krb5-devel.x86_64 0:1.10.3-65.el6
libcom_err-devel.x86_64 0:1.41.12-23.el6
libkadm5.x86_64 0:1.10.3-65.el6 libselinux-devel.x86_64 0:2.0.94-7.el6
libsepol-devel.x86_64 0:2.0.41-4.el6
zlib-devel.x86_64 0:1.2.3-29.el6
Updated:
openssl.x86_64 0:1.0.1e-57.el6
Dependency Updated:
e2fsprogs.x86_64 0:1.41.12-23.el6 e2fsprogs-libs.x86_64 0:1.41.12-23.el6
keyutils.x86_64 0:1.4-5.el6 keyutils-libs.x86_64 0:1.4-5.el6
krb5-libs.x86_64 0:1.10.3-65.el6
krb5-workstation.x86_64 0:1.10.3-65.el6 libcom_err.x86_64 0:1.41.12-23.el6 libselinux.x86_64 0:2.0.94-7.el6
libselinux-python.x86_64 0:2.0.94-7.el6 libselinux-utils.x86_64 0:2.0.94-7.el6 libss.x86_64 0:1.41.12-23.el6
Complete!
通过上述日志分析,使用rpm命令离线安装openssl-devel包,所需rpm包具体如下:
libcom_err-1.41.12-23.el6.x86_64.rpm
libselinux-2.0.94-7.el6.x86_64.rpm
keyutils-libs-1.4-5.el6.x86_64.rpm
krb5-libs-1.10.3-65.el6.x86_64.rpm
libkadm5-1.10.3-65.el6.x86_64.rpm
libss-1.41.12-23.el6.x86_64.rpm
openssl-1.0.1e-57.el6.x86_64.rpm
keyutils-libs-devel-1.4-5.el6.x86_64.rpm
e2fsprogs-libs-1.41.12-23.el6.x86_64.rpm
libcom_err-devel-1.41.12-23.el6.x86_64.rp
libsepol-devel-2.0.41-4.el6.x86_64.rpm
libselinux-devel-2.0.94-7.el6.x86_64.rpm
krb5-devel-1.10.3-65.el6.x86_64.rpm
zlib-devel-1.2.3-29.el6.x86_64.rpm
openssl-devel-1.0.1e-57.el6.x86_64.rpm
e2fsprogs-1.41.12-23.el6.x86_64.rpm
krb5-workstation-1.10.3-65.el6.x86_64.rpm
keyutils-1.4-5.el6.x86_64.rpm
libselinux-python-2.0.94-7.el6.x86_64.rpm
libselinux-utils-2.0.94-7.el6.x86_64.rpm
rpm包下载地址:ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/,(网络资料,rpm包种类很全),在linux系统可以通过wget命令下载所有的包,新建download-packages.sh文件,将如下内容增加到文件,具体内容如下:
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/e2fsprogs-1.41.12-23.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/e2fsprogs-libs-1.41.12-23.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/keyutils-1.4-5.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/keyutils-libs-1.4-5.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/keyutils-libs-devel-1.4-5.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/krb5-devel-1.10.3-65.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/krb5-libs-1.10.3-65.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/krb5-workstation-1.10.3-65.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/libcom_err-1.41.12-23.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/libcom_err-devel-1.41.12-23.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/libkadm5-1.10.3-65.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/libselinux-2.0.94-7.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/libselinux-devel-2.0.94-7.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/libselinux-python-2.0.94-7.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/libselinux-utils-2.0.94-7.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/libsepol-devel-2.0.41-4.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/libss-1.41.12-23.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/openssl-1.0.1e-57.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/openssl-devel-1.0.1e-57.el6.x86_64.rpm
wget ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/zlib-devel-1.2.3-29.el6.x86_64.rpm
授予download-packages.sh文件执行权限,并执行脚本命令,具体如下:
[root@yoodb openssl-devel-packages]# chmod 777 download-packages.sh
[root@yoodb openssl-devel-packages]# ./download-packages.sh
执行完成后,目录下会存在openssl-devel所需要的依赖包,依赖包信息如下:
[root@yoodb openssl-devel-packages]# ll
total 6456
-rwxrwxrwx. 1 root root 2171 Sep 4 17:20 downloadpackages.sh
-rw-r–r–. 1 root root 567328 Sep 4 17:21 e2fsprogs-1.41.12-23.el6.x86_64.rpm
-rw-r–r–. 1 root root 124172 Sep 4 17:21 e2fsprogs-libs-1.41.12-23.el6.x86_64.rpm
-rw-r–r–. 1 root root 40152 Sep 4 17:21 keyutils-1.4-5.el6.x86_64.rpm
-rw-r–r–. 1 root root 20684 Sep 4 17:22 keyutils-libs-1.4-5.el6.x86_64.rpm
-rw-r–r–. 1 root root 29456 Sep 4 17:22 keyutils-libs-devel-1.4-5.el6.x86_64.rpm
-rw-r–r–. 1 root root 516132 Sep 4 17:22 krb5-devel-1.10.3-65.el6.x86_64.rpm
-rw-r–r–. 1 root root 691188 Sep 4 17:22 krb5-libs-1.10.3-65.el6.x86_64.rpm
-rw-r–r–. 1 root root 833612 Sep 4 17:22 krb5-workstation-1.10.3-65.el6.x86_64.rpm
-rw-r–r–. 1 root root 38516 Sep 4 17:22 libcom_err-1.41.12-23.el6.x86_64.rpm
-rw-r–r–. 1 root root 33664 Sep 4 17:23 libcom_err-devel-1.41.12-23.el6.x86_64.rpm
-rw-r–r–. 1 root root 146500 Sep 4 17:23 libkadm5-1.10.3-65.el6.x86_64.rpm
-rw-r–r–. 1 root root 111508 Sep 4 17:23 libselinux-2.0.94-7.el6.x86_64.rpm
-rw-r–r–. 1 root root 140160 Sep 4 17:23 libselinux-devel-2.0.94-7.el6.x86_64.rpm
-rw-r–r–. 1 root root 207796 Sep 4 17:23 libselinux-python-2.0.94-7.el6.x86_64.rpm
-rw-r–r–. 1 root root 84072 Sep 4 17:23 libselinux-utils-2.0.94-7.el6.x86_64.rpm
-rw-r–r–. 1 root root 65484 Sep 4 17:23 libsepol-devel-2.0.41-4.el6.x86_64.rpm
-rw-r–r–. 1 root root 42896 Sep 4 17:24 libss-1.41.12-23.el6.x86_64.rpm
-rw-r–r–. 1 root root 1600772 Sep 4 17:24 openssl-1.0.1e-57.el6.x86_64.rpm
-rw-r–r–. 1 root root 1227684 Sep 4 17:24 openssl-devel-1.0.1e-57.el6.x86_64.rpm
-rw-r–r–. 1 root root 44984 Sep 4 17:24 zlib-devel-1.2.3-29.el6.x86_64.rpm
linux下批量安装某个目录下所有rpm包,使用rpm命令时带–force参数,具体命令rpm -Uvh –force *.rpm:
[root@yoodb openssl-devel-packages]# rpm -Uvh –force *.rpm
warning: e2fsprogs-1.41.12-23.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing… ########################################### [100%]
1:libcom_err ########################################### [ 5%]
2:libselinux ########################################### [ 10%]
3:keyutils-libs ########################################### [ 15%]
4:krb5-libs ########################################### [ 20%]
5:libkadm5 ########################################### [ 25%]
6:libss ########################################### [ 30%]
7:openssl ########################################### [ 35%]
8:keyutils-libs-devel ########################################### [ 40%]
9:e2fsprogs-libs ########################################### [ 45%]
10:libcom_err-devel ########################################### [ 50%]
11:zlib-devel ########################################### [ 55%]
12:libsepol-devel ########################################### [ 60%]
13:libselinux-devel ########################################### [ 65%]
14:krb5-devel ########################################### [ 70%]
15:openssl-devel ########################################### [ 75%]
16:e2fsprogs ########################################### [ 80%]
17:krb5-workstation ########################################### [ 85%]
18:keyutils ########################################### [ 90%]
19:libselinux-python ########################################### [ 95%]
20:libselinux-utils ########################################### [100%]
另一种方式离线安装openssl-devel依赖包,就是将Redhat ISO文件当做yum本地数据源,配置完成后,直接使用yum install -y openssl openssl-devel命令。
上述问题解决成功后,继续执行./configure –prefix=/usr/local/keepalived命令,报“* WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS.”错误,解决方案:Keepalived-1.3.5编译安装步骤和启动方式详解:https://blog.yoodb.com/yoodb/article/detail/1378
————————————————
版权声明:本文为CSDN博主「一缕清风o」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/afreon/article/details/77866695