I have been experimenting with squid at home, and recently configured yum to use the squid proxy server I set up. There are two ways you can get yum to use an HTTP or FTP proxy. First, you can make yum use a proxy for a single session by setting the http_proxy and ftp_proxy environment variables:
If you want to make the proxy settings permanent, you can add a proxy directive to /etc/yum.conf:
grep proxy /etc/yum.conf proxy=http://proxy:3128
If your proxy requires you to authenticate, you can add the credentials to the configuration file as well.