vi /etc/yum.conf
 
 添加下面字段
 proxy = http://proxyip:port
 proxy = ftp://proxyip:port
 proxy_username=username
 proxy_password=password