#vi /etc/yum.conf
add follow text into it.
# The proxy server - proxy server:port number
proxy=http://10.204.9.8:9090
# The account details for yum connections
proxy_username=test
proxy_password=password
these command and file are tested in CentOS.