新分配了虛擬機,安裝了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,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對武林網網站的支持!
新聞熱點
疑難解答