# 备份
# mv /etc/yum.repos.d/CentOS-Base.repo{,.bak}
# 修改
# vi /etc/yum.repos.d/CentOS-Base.repo
Config代码 收藏代码
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
注意,以上内容去掉前面的空格啊。
# yum clean all
# yum makecache #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
# yum install vim* #测试域名是否可用
分享到:
相关推荐
centos6.2更新yum源
CentOS 6.2系统镜像有两个,安装系统只用到第一个镜像,第二个镜像是系统自带软件安装包。 安装CentOS 6.2系统的计算机内存必须等于或者大于628M(最小内存628M),才能启用图形安装模式。 CentOS 6.2文本...
CentOS6.2下配置Django+Python环境步骤
centos6.2安装 CentOS 6.2安装 实验环境:VMware 6.5.2 安装镜像:CentOS-6.2-i386-bin-DVD1.iso CentOS-6.2镜像共两张DVD1和DVD2,安装操作系统只用DVD1即可 镜像下载地址: 32位DVD1...
CentOS6.2使用第三方yum源安装更多rpm软件包宣贯.pdf
CentOS 6.2安装(超级详细图解教程)
centos6.2安装手册,用于宇视相关软件部署、开局所用。
NULL 博文链接:https://itsaga.iteye.com/blog/2286554
CentOS6.2安装(超级详细图解教程)
CentOS6.2_64bitDNS服务配置
在VMware中安装linux流程 CentOS 6.2安装教程
CentOS 6.2 配置防火墙,关闭SELINUX.do
安装双系统-win7-CentOS6.2推荐方法
centos6.2-64下安装oracle11G
Centos6.2上做nginx和tomcat的集成及负载均衡
在新版的 CENTOS6.2 中,安装 oracle 10g
CentOS_6.2安装(超级详细图解教程
CentOs6.2下个人完整的安装客户端详细步骤,亲测可用。
CentOS 6.2 rpm 方式安装 MySQL 的文档,简单实用!
CentOS 6.2 Linux 安装截图详解