yum 软件包离线安装

  1. 安装下载 yum 包插件

    yum install yum-plugin-downloadonly
  2. 只下载不安装

    yum  install --downloadonly --downloaddir=opt/krb5yum/  krb5-server  krb5-libs krb5-workstation
  3. 查看下载文件

    [root@ambari-01 lyjyums]# ls
    krb5-libs-1.15.1-50.el7.x86_64.rpm         libkadm5-1.15.1-50.el7.x86_64.rpm
    krb5-server-1.15.1-50.el7.x86_64.rpm       openldap-2.4.44-22.el7.x86_64.rpm
    krb5-workstation-1.15.1-50.el7.x86_64.rpm  openldap-clients-2.4.44-22.el7.x86_64.rpm

4.rpm 包安装

rpm -ivh *.rpm 安装软件包显示进度

### 有可能会用到  rpm -Uvh update/*.rpm  更新软件包

rpm -q krb5-server  查询是否安装成功

5、如果离线环境没有rpm命令,则需要下载

yum install -y rpm

为者常成,行者常至