wget设置代理
vim /etc/wgetrc
# They will override the value in the environment.
https_proxy = http://192.168.10.5:3128/
http_proxy = http://192.168.10.5:3128/
ftp_proxy = http://192.168.10.5:3128/
If you do not want to use proxy at all, set this to off.
use_proxy = on
yum设置代理
vim /etc/yum.conf
增加
proxy=http://192.168.10.5:3128
yum设置阿里镜像库
备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
# 清除系统所有的yum缓存
yum makecache
# 生成yum缓存