新分配了虚拟机,安装了centos7.2版本。
因是内网机器,不能直接联外网,不过可以设置yum代理,通过另一台能上外网的服务器来更新
#cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
#vi
/etc/yum.conf
proxy
= 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-release
CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
如果要设置全局代理,则
#vi /etc/profile
export http_proxy=http://192.168.1.188:3128/
export ftp_proxy=http://192.168.1.188:3128/
本文介绍如何在内网环境下为CentOS 7.2版本进行系统更新。通过配置yum代理并使用阿里云镜像源,实现了内网机器的系统升级到CentOS 7.3版本。
1228

被折叠的 条评论
为什么被折叠?



