Use the Yum plugin downloadonly to download the dependent packages required to install the software and keep the Yum-downloadonly or Yum-plugin-downloadonly package installed to the specified file. Yum Install yum-plugin-downloadonlyyum-y install--downloadonly--downloaddir=/var/ftp/yum cmake gcc gcc-c++ libgcrypt* crypt* Libaio libaio-devel automake autoconf BZR bison libtool ncurses5-devel libaio perl-time-hires perl-dbd-mysql Perl-I O-SOCKET-SSLRSYNC-AVRT rsync://mirrors.ustc.edu.cn/centos/6.6/updates/x86_64/packages/ /var/ftp/ Yum1. Save the Yum installed RPM package Edit file/etc/yum.confkeepcache=0 Modify the default 0 for the 1,rpm package after download does not clear the downloaded directory after the download is as follows: [[email protected] ~]# ls/var/ cache/yum/x86_64/6/base/packages/lrzsz-0.12.20-27.1.el6.x86_64.rpm screen-4.0.3-18.el6.x86_64.rpm
Yum installs the software and retains the downloaded software