CentOS 6.X 哈工大源

31 Jan 2013

由于正常 CentOS 源不在教育网免费 IP 列表里,或者使用 VPN,或者更换自己的源,下面提供 哈尔滨工业大学 自己的源,我这里用的是 EL6.3

Step1

1 $ touch CentOS-Base.repo

编辑 CentOS-Base 添加:

# 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
baseurl=http://run.hit.edu.cn/centos/6.3/os/$basearch/
gpgcheck=1
gpgkey=http://run.hit.edu.cn/centos/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-$releasever - Updates
baseurl=http://run.hit.edu.cn/centos/6.3/updates/$basearch/
gpgcheck=1
gpgkey=http://run.hit.edu.cn/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://run.hit.edu.cn/centos/6.3/extras/$basearch/
gpgcheck=1
gpgkey=http://run.hit.edu.cn/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://run.hit.edu.cn/centos/6.3/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://run.hit.edu.cn/centos/RPM-GPG-KEY-CentOS-6

Step2

替换系统的默认 repo:

1 $ sudo mv CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo

Step3

1 # 清除暂存中旧的 rpm 头文件和包文件
2 $ sudo yum clean all
3 # 把服务器的包信息下载到本地电脑缓存起来
4 $ sudo yum makecache
5 # 更新所有的 rpm 包
6 $ sudo yum update

下面就可以正常安装软件了,我要 screen,expect

Fork me on GitHub