文件准备
通过指令下载keepalived及依赖包
yum install -y keepalived --downloadonly --downloaddir /local/keepalived
[root@localhost ~]# yum install -y keepalived --downloadonly --downloaddir /local/keepalived Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.bfsu.edu.cn * epel: ftp.riken.jp * extras: mirrors.bfsu.edu.cn * updates: mirrors.bfsu.edu.cn Resolving Dependencies --> Running transaction check ---> Package keepalived.x86_64 0:1.3.5-19.el7 will be installed --> Processing Dependency: libnetsnmpmibs.so.31()(64bit) for package: keepalived-1.3.5-19.el7.x86_64 --> Processing Dependency: libnetsnmpagent.so.31()(64bit) for package: keepalived-1.3.5-19.el7.x86_64 --> Processing Dependency: libnetsnmp.so.31()(64bit) for package: keepalived-1.3.5-19.el7.x86_64 --> Running transaction check ---> Package net-snmp-agent-libs.x86_64 1:5.7.2-49.el7_9.2 will be installed --> Processing Dependency: libsensors.so.4()(64bit) for package: 1:net-snmp-agent-libs-5.7.2-49.el7_9.2.x86_64 ---> Package net-snmp-libs.x86_64 1:5.7.2-49.el7_9.2 will be installed --> Running transaction check ---> Package lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ===================================================================================================================================================================================================== Package Arch Version Repository Size ===================================================================================================================================================================================================== Installing: keepalived x86_64 1.3.5-19.el7 base 332 k Installing for dependencies: lm_sensors-libs x86_64 3.4.0-8.20160601gitf9185e5.el7 base 42 k net-snmp-agent-libs x86_64 1:5.7.2-49.el7_9.2 updates 707 k net-snmp-libs x86_64 1:5.7.2-49.el7_9.2 updates 752 k Transaction Summary ===================================================================================================================================================================================================== Install 1 Package (+3 Dependent packages) Total download size: 1.8 M Installed size: 6.0 M Background downloading packages, then exiting: (1/4): lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm | 42 kB 00:00:00 (2/4): keepalived-1.3.5-19.el7.x86_64.rpm | 332 kB 00:00:00 (3/4): net-snmp-libs-5.7.2-49.el7_9.2.x86_64.rpm | 752 kB 00:00:00 (4/4): net-snmp-agent-libs-5.7.2-49.el7_9.2.x86_64.rpm | 707 kB 00:00:03 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 468 kB/s | 1.8 MB 00:00:03 exiting because "Download Only" specified
下载的文件有4个
lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm
keepalived-1.3.5-19.el7.x86_64.rpm
net-snmp-libs-5.7.2-49.el7_9.2.x86_64.rpm
net-snmp-agent-libs-5.7.2-49.el7_9.2.x86_64.rpm
将这四个文件放入离线库中,并更新本地源或私有源
createrepo --update /yum/local
测试安装
yum install keepalived
欢喜的期待成功,可是太顺利了怎么写博客呢