首页 > 学院 > 操作系统 > 正文

CectOS7设置代理更新阿里云yum

2020-10-28 18:46:01
字体:
来源:转载
供稿:网友

新分配了虚拟机,安装了centos7.2版本。

因是内网机器,不能直接联外网,不过可以设置yum代理,通过另一台能上外网的服务器来更新

#cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core)#vi /etc/yum.confproxy = http://192.168.1.188:3128/#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 makecache#yum update#cat /etc/redhat-releaseCentOS Linux release 7.3.1611 (Core)

如果要设置全局代理,则

#vi /etc/profileexport http_proxy=http://192.168.1.188:3128/export ftp_proxy=http://192.168.1.188:3128/

以上所述是小编给大家介绍的CectOS7设置代理更新阿里云yum,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对武林网网站的支持!

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表