Em vez de seu script chamar yum
para fazer o download e instalar, basta fazer o script fazer o download do arquivo (por exemplo, curl
ou wget
) e forçar a instalação do arquivo .rpm
baixado :
rpm --install --force file_name.rpm
Como o OP indicou, rpm
pode fazer o donwload da URL diretamente sem problemas. Na página do manual:
INSTALLING, UPGRADING, AND REMOVING PACKAGES:
rpm {-i|--install} [install-options] PACKAGE_FILE ...
rpm {-U|--upgrade} [install-options] PACKAGE_FILE ...
rpm {-F|--freshen} [install-options] PACKAGE_FILE ...
<snip>
In these options, PACKAGE_FILE can be either rpm binary file or ASCII
package manifest (see PACKAGE SELECTION OPTIONS), and may be specified
as an ftp or http URL, in which case the package will be downloaded
before being installed. See FTP/HTTP OPTIONS for information on rpm's
internal ftp and http client support.