网上找了很久都找不到centos 7 的163源,大多只有6的配置。写了一个7能用的。注意下版本,换成自己的版本吧
-
[base]
-
name=CentOS-$releasever - Base - 163.com
-
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
-
baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
-
gpgcheck=0
-
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
-
#released updates
-
[updates]
-
name=CentOS-$releasever - Updates - 163.com
-
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
-
baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
-
gpgcheck=0
-
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
-
#packages used/produced in the build but not released
-
[addons]
-
name=CentOS-$releasever - Addons - 163.com
-
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
-
baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
-
gpgcheck=0
-
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
-
#additional packages that may be useful
-
[extras]
-
name=CentOS-$releasever - Extras - 163.com
-
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
-
baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
-
gpgcheck=0
-
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
-
#additional packages that extend functionality of existing packages
-
[centosplus]
-
name=CentOS-$releasever - Plus - 163.com
-
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
-
baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
-
gpgcheck=0
-
enabled=0
-
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
-
#contrib - packages by Centos Users
-
[contrib]
-
name=CentOS-$releasever - Contrib - 163.com
-
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
-
baseurl=http://mirrors.163.com/centos/7.1.1503/updates/x86_64
-
gpgcheck=0
-
enabled=0
-
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
要修改的文件在这个路径下:/etc/yum.repos.d
记得备份下原文件。
(责任编辑:IT) |