新分配了虚拟机,安装了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/