Install the already downloaded RPM package
As I downloaded from Google Chrome website:
For example, if you run the following command at the terminal (the file requires an absolute path): google-chrome-stable_current_i386.rpm
Yum localinstall/home/panbin/software/google-chrome-stable_current_i386.rpm
When you execute the above command, an error occurs, prompting the following error message:
Public key for google-chrome-stable_current_i386.rpm isn't installed
The problem can be resolved by adding a parameter to the Yum localinstall instruction at this point, as follows:
Yum localinstall/home/panbin/software/google-chrome-stable_current_i386.rpm--nogpgcheck
Download only do not install
The Yum command itself can be used to download an RPM package, and the standard Yum command provides a--downloadonly (download only) option to achieve this goal. $ sudo yum install--downloadonly <package-name>
By default, a downloaded RPM package is saved in the following directory:/var/cache/yum/x86_64/[centos/fedora-version]/[repository]/packages
The [repository] above indicates the name of the source repository for the download package (for example, base, fedora, updates)
If you want to download a package to a specified directory (such as/tmp): $ sudo yum install--downloadonly--downloaddir=/tmp <package-name>
Note that if the downloaded package contains any dependencies that are not satisfied, Yum will download all the dependency packages, but will not be installed.
Another important thing is that in Centos/rhel 6 or earlier versions, you need to install a separate Yum plug-in (named Yum-plugin-downloadonly) to use the--downloadonly command option: $ sudo yum Install Yum-plugin-downloadonly
Without the plugin, you will get the following error when using Yum: Command line error:no such option:--downloadonly from: http://blog.csdn.net/panbin0054/article /details/7197634
Http://www.linuxidc.com/Linux/2015-03/115331.htm