/etc/apt/sources.list
deb http://cn.archive.ubuntu.com/ubuntu/precise main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/precise-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/precise-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/precise-backports main restricted universe multiverse##测试版源
deb http://cn.archive.ubuntu.com/ubuntu/precise-proposed main restricted universe multiverse
# 源码
deb-src http://cn.archive.ubuntu.com/ubuntu/precise main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/precise-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/precise-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/precise-backports main restricted universe multiverse##测试版源
deb-src http://cn.archive.ubuntu.com/ubuntu/precise-proposed main restricted universe multiverse
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/precise partner
deb http://extras.ubuntu.com/ubuntu/precise main
yum源
第一步:下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
第二步:运行yum makecache生成缓存
yum clean all
yum makecache