交大不像163或者sohu提供repo文件,需要自己手动写,这点有点小麻烦了。而且现在不需要具体版本6.4直接都定位到6目录上,需要注意。存储为一个repo文件,放到 /etc/yum.repo.d/ 下,重建yum缓存即可。
[base]
name=CentOS-$releasever - Base
baseurl=http://ftp.sjtu.edu.cn/centos/6/os/$basearch/
gpgcheck=1
gpgkey=http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-6
[updates]
name=CentOS-$releasever - Updates
baseurl=http://ftp.sjtu.edu.cn/centos/6/updates/$basearch/
gpgcheck=1
gpgkey=http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-6
[extras]
name=CentOS-$releasever - Extras
baseurl=http://ftp.sjtu.edu.cn/centos/6/extras/$basearch/
gpgcheck=1
gpgkey=http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-6
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://ftp.sjtu.edu.cn/centos/6/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-6