Tuesday, 29 September 2009

Fedora: Using and authenticating yum through a proxy

I have just finished a Fedora 11 installation here at the office. We needed a test bed for working with symfony and our EL machines did not provide php 5.2.

Next thing was to update the new machine and install additional software and that meant being able to go through a squid proxy server, that requires authentication.

A little bit of digging and the magic man yum.conf revealed the following :

Edit /etc/yum.conf and add the following lines:


Needless to say that the same configuration works perfectly on CentOS 5.4 ...

When your machine is behind a proxy then, in order for many other programs -- like wget -- to function correctly, you also need to export the http_proxy variable. The correct format for it is :

export http_proxy=http://username:password@proxy.domain:port

No comments :