Warning: Undefined array key "cperpage" in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 255

Warning: Undefined variable $output in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 325

Warning: Undefined variable $fixed_tags in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 326

Warning: Undefined variable $isshowdots in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 327

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 330

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 333

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 336

Warning: Undefined variable $post in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Attempt to read property "ID" on null in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Undefined variable $post in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Attempt to read property "ID" on null in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Undefined variable $more_text_link in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345
RHEL改用Centos源 – 理想社会

RHEL改用Centos源

实验室购买的rhel订阅到期了。无法使用yum来解决依赖包问题,是个很头痛的事。

逼不得已将rhel的源改为centos。

  1. 系统环境:RHEL 5
  2. 备份源文件#cp -a /etc/yum.repos.d/rhel-debuginfo.repo{,.bak}
  3. 创建CentOS-Base.repo 为如下内容:
    [base]
    name=CentOS-5 - Base
    repo=os
    baseurl=http://centos.ustc.edu.cn/centos/5/os/$basearch/
    gpgcheck=1
    gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5[update]
    name=CentOS-5 - Updates
    baseurl=http://centos.ustc.edu.cn/centos/5/updates/$basearch/
    gpgcheck=1
    gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5[addons]
    name=CentOS-5 - Addons
    baseurl=http://centos.ustc.edu.cn/centos/5/addons/$basearch/
    gpgcheck=1
    gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
    
    [extras]
    name=CentOS-5 - Extras
    baseurl=http://centos.ustc.edu.cn/centos/5/extras/$basearch/
    gpgcheck=1
    gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
    
    [centosplus]
    name=CentOS-5 - Plus
    baseurl=http://centos.ustc.edu.cn/centos/5/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
    
    [contrib]
    name=CentOS-5 - Contrib
    baseurl=http://centos.ustc.edu.cn/centos/5/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  4. 导入KEY文件
    #rpm –import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
  5. 测试一下,看看是否正常 #yum list

评论

发表回复

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据