redhat修改yum源(CENTOS)
配置rhel 5 使用CentOS的yum站點升級
刪除原來的/etc/yum.conf檔案和/etc/yum.repo.d目錄
rm -rf /etc/yum.conf
cd /etc/yum.repos.d/
rm -rf rhel-debuginfo.repo
vi /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[base]
name=centos-5 - Base
baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/
# the other site: http://centos.candishosting.com.cn/centos/5/os/i386/
# you can find more site in: http://www.centos.org/modules/tinycontent/index.php?id=13
enabled=1
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-5 - Updates
baseurl=http://mirror.centos.org/centos/5/updates/i386/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
baseurl=http://mirror.centos.org/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
baseurl=http://mirror.centos.org/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
baseurl=http://mirror.centos.org/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=http://mirror.centos.org/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=http://mirror.centos.org/centos/5/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
到此就ok了 ,是不是很方便!!!,這個是中科大的源,號稱每隔小時跟新一次,速度確實蠻快
測試下
yum -y install system-config-date
刪除原來的/etc/yum.conf檔案和/etc/yum.repo.d目錄
rm -rf /etc/yum.conf
cd /etc/yum.repos.d/
rm -rf rhel-debuginfo.repo
vi /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[base]
name=centos-5 - Base
baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/
# the other site: http://centos.candishosting.com.cn/centos/5/os/i386/
# you can find more site in: http://www.centos.org/modules/tinycontent/index.php?id=13
enabled=1
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-5 - Updates
baseurl=http://mirror.centos.org/centos/5/updates/i386/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
baseurl=http://mirror.centos.org/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
baseurl=http://mirror.centos.org/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
baseurl=http://mirror.centos.org/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=http://mirror.centos.org/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=http://mirror.centos.org/centos/5/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
到此就ok了 ,是不是很方便!!!,這個是中科大的源,號稱每隔小時跟新一次,速度確實蠻快
測試下
yum -y install system-config-date
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14661773/viewspace-743856/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- redhat6.7修改為centos6.7官方yum源RedhatCentOS
- CentOS修改yum源CentOS
- CentOS7 修改 yum 源CentOS
- Redhat 7使用CentOS 7的Yum網路源RedhatCentOS
- Centos-7修改yum源為國內的yum源CentOS
- redhat 5.5 配置網路yum源Redhat
- RedHat8 配置本地yum源Redhat
- 修改Centos7預設yum源為阿里雲源CentOS阿里
- CentOS7 yum源修改為阿里,配置阿里epel源CentOS阿里
- Redhat8 yum源內網部署Redhat內網
- CentOS 配置yum源CentOS
- CentOS 搭建內部Yum源同步阿里Yum源CentOS阿里
- centos 替換yum源CentOS
- Linux之RedHat7如何更換yum源LinuxRedhat
- Redhat(02):yum 配置Redhat
- Linux CentOS 7 更新yum源LinuxCentOS
- CentOS6.9配置yum源CentOS
- Centos 7 常用yum源配置CentOS
- Centos系統配置yum源CentOS
- CentOS6.8配置yum源CentOS
- centos7.5配置yum源CentOS
- CentOS7--配置yum源CentOS
- centos同步yum源到本地,建立本地網路yum源CentOS
- Centos-Stream 配置本地yum源和配置阿里雲yum源CentOS阿里
- Centos7配置阿里epel源|yum源CentOS阿里
- centos6-增加阿里yum源CentOS阿里
- centos-7.6配置本地yum源CentOS
- CentOS7 配置 163 yum 源CentOS
- CentOS 7 配置 阿里雲 yum源CentOS阿里
- linux CentOS更換 ali YUM源LinuxCentOS
- 小知識:CentOS配置yum源/解決yum源失效問題CentOS
- CentOS7.9 搭建內部yum源伺服器同步阿里yum源CentOS伺服器阿里
- CentOS 更改 yum 映象源為阿里雲映象源CentOS阿里
- CentOS7配置yum國內源CentOS
- CentOS8配置阿里雲YUM源CentOS阿里
- yum映象源修改最新版(2023)
- centos修改國內源CentOS
- Centos8.x yum 源配置 解決 yum 不可用CentOS
- 在Linux(Redhat/CentOS)下安裝MySQL之yum(rpm)線上安裝方式LinuxRedhatCentOSMySql