linux之yum下载rpm包离线安装

图片[1]-linux之yum下载rpm包离线安装-趣考网

查看依赖包

> yum deplist nginxpackage: nginx.x86_64 1:1.20.1-1.el7.ngx  dependency: /bin/sh   provider: bash.x86_64 4.2.46-34.el7  dependency: libc.so.6(GLIBC_2.17)(64bit)   provider: glibc.x86_64 2.17-324.el7_9  dependency: libcrypt.so.1()(64bit)   provider: glibc.x86_64 2.17-324.el7_9  dependency: libcrypt.so.1(GLIBC_2.2.5)(64bit)   provider: glibc.x86_64 2.17-324.el7_9  dependency: libcrypto.so.10()(64bit)   provider: openssl-libs.x86_64 1:1.0.2k-21.el7_9  dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit)   provider: openssl-libs.x86_64 1:1.0.2k-21.el7_9  dependency: libcrypto.so.10(libcrypto.so.10)(64bit)   provider: openssl-libs.x86_64 1:1.0.2k-21.el7_9  dependency: libdl.so.2()(64bit)   provider: glibc.x86_64 2.17-324.el7_9  dependency: libdl.so.2(GLIBC_2.2.5)(64bit)   provider: glibc.x86_64 2.17-324.el7_9  dependency: libpcre.so.1()(64bit)   provider: pcre.x86_64 8.32-17.el7  dependency: libpthread.so.0()(64bit)   provider: glibc.x86_64 2.17-324.el7_9  dependency: libpthread.so.0(GLIBC_2.2.5)(64bit)   provider: glibc.x86_64 2.17-324.el7_9  dependency: libpthread.so.0(GLIBC_2.3.2)(64bit)   provider: glibc.x86_64 2.17-324.el7_9  dependency: libssl.so.10()(64bit)   provider: openssl-libs.x86_64 1:1.0.2k-21.el7_9  dependency: libssl.so.10(libssl.so.10)(64bit)   provider: openssl-libs.x86_64 1:1.0.2k-21.el7_9  dependency: libz.so.1()(64bit)   provider: zlib.x86_64 1.2.7-19.el7_9  dependency: openssl >= 1.0.2   provider: openssl.x86_64 1:1.0.2k-21.el7_9  dependency: rtld(GNU_HASH)   provider: glibc.x86_64 2.17-324.el7_9   provider: glibc.i686 2.17-324.el7_9  dependency: shadow-utils   provider: shadow-utils.x86_64 2:4.6-5.el7  dependency: systemd   provider: systemd.x86_64 219-78.el7_9.3

方法一:使用repotrack下载nginx rpm安装所需要的所有依赖

> yum install yum-utils -y//下载nginx全量依赖包> repotrack nginx

方法二:使用yumdownloader下载

> yum install yum-utils -y> yumdownloader --resolve --destdir=. nginx
  • –destdir:指定 rpm 包下载目录(不指定时,默认为当前目录)
  • –resolve:下载依赖的 rpm 包。

方法三:yum 的 downloadonly 插件

> yum install yum-download -y> yum -y  install nginx --downloadonly --downloaddir=.

与 yumdownloader 命令一样,也是仅会将主软件包和基于你现在的操作系统所缺少的依赖关系包一并下载。

离线安装 rpm

> rpm -Uvh --force --nodeps *.rpm
© 版权声明
THE END
喜欢就支持一下吧
点赞15 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容