Tuesday, February 24, 2009

download rpm using yum, but do not install, --downloadonly doesn't download,

Yum can be used to download(only) suitable rpm and its dependencies.
Yum downloadonly plugin is required to download rpms without installing them.
First, install downloadonly plugins using the command:

# yum install yum-downloadonly

Now you can download any rpm without installing. For example to download tomcat5-webapps & its all dependencies in current directory ( . ), I have used the following command:

#yum install --downloadonly --downloaddir . tomcat5-admin-webapps tomcat5-webapps

Monday, February 23, 2009

connect yum using proxy, yum cannot connect through proxy

Yum can connect with external repository if http_proxy , ftp_proxy environment variables are set properly.

Set the environment variables (from command line):

# http_proxy=""
# ftp_proxy=""

/* if PROXY host is & PROT is 3128 */
Export the variable (from command line):

# export http_proxyexport ftp_proxy

Test yum & reply me.