zoukankan      html  css  js  c++  java
  • CentOS4 可用镜像及更新方式

    由于非得使用4.7的版本,所以找了一大圈,终于发现了一个能用的源:

    http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/

    更新方法如下:

    vi /etc/yum.repos.d/CentOS-Base.repo
    内容如下:

    [base]
    name=CentOS-$releasever - Base
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
    baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/os/$basearch/
    gpgcheck=1
    #gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
    gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
    priority=1
    protect=1

    #released updates
    [update]
    name=CentOS-$releasever - Updates
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
    priority=1
    protect=1

    #packages used/produced in the build but not released
    [addons]
    name=CentOS-$releasever - Addons
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
    baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/addons/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
    priority=1
    protect=1

    #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.usc.edu/pub/linux/distributions/centos/4.8/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
    priority=1
    protect=1

    #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.usc.edu/pub/linux/distributions/centos/4.8/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
    priority=2
    protect=1

    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-$releasever - Contrib
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
    baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
    priority=2
    protect=1

    接下来,导入key
    rpm --import http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-CentOS-4
    yum upgrade
    [root@localhost yum.repos.d]# yum upgrade
    base                               100% |=========================| 1.1 kB    00:00    
    primary.xml.gz            100% |=========================| 856 kB    00:07    
    base      : ################################################## 2458/2458
    updates                         100% |=========================| 951 B    00:00    
    primary.xml.gz            100% |=========================| 129 kB    00:02    
    updates   : ################################################## 324/324
    addons                           100% |=========================| 951 B    00:00    
    primary.xml.gz            100% |=========================| 157 B    00:00    
    extras                           100% |=========================| 1.1 kB    00:00    
    primary.xml.gz            100% |=========================| 74 kB    00:02    
    extras    : ################################################## 244/244

    yum update

    OK,到此为止,大功告成!!!!!!!!

  • 相关阅读:
    水池问题的lua语言算法(面试题分析:我的Twitter技术面试失败了)
    grep
    hdu 4455 Substrings(计数)
    Concurrency Programming Guide 并发设计指引(二)
    ASP.NET 预编译命令(解决发布后第一次访问慢问题)
    将浏览页面变为可编辑状态
    windows系统上利用putty通过SSH连接亚马逊AWS服务器
    SQL Server2008 R2 数据库镜像实施手册(双机)SQL Server2014同样适用
    非域环境下使用证书部署数据库(SqlServer2008R2)镜像
    遇到问题---hosts不起作用问题的解决方法
  • 原文地址:https://www.cnblogs.com/cosiray/p/2508735.html
Copyright © 2011-2022 走看看