centos的同步
ubuntu的同步
使用系统的apt-mirror工具同步一个mirror
修改/etc/apt/mirror.list
############# config ################## # # set base_path /var/spool/apt-mirror set base_path /data/repository/ubuntu # set mirror_path $base_path/mirror # set skel_path $base_path/skel # set var_path $base_path/var # set cleanscript $var_path/clean. # set defaultarch <running host architecture> # set postmirror_script $var_path/postmirror.sh set run_postmirror 0 set nthreads 20 set _tilde 0 # # 从163镜像源同步 deb http://mirrors.163.com/ubuntu/ trusty main restricted deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted deb http://mirrors.163.com/ubuntu/ trusty universe deb http://mirrors.163.com/ubuntu/ trusty-updates universe deb http://mirrors.163.com/ubuntu/ trusty multiverse deb http://mirrors.163.com/ubuntu/ trusty-updates multiverse deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-security main restricted deb http://mirrors.163.com/ubuntu/ trusty-security universe deb http://mirrors.163.com/ubuntu/ trusty-security multiverse deb http://extras.ubuntu.com/ubuntu trusty main clean http://mirrors.163.com/ubuntu/ # #同步openstack的ubuntu二进制源 deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/liberty main
使用apt-mirror命令即可同步到本地
再使用http提供本地的镜像服务。
centos下同步openstack的centos二进制源
[openstack-liberty] name=OpenStack Icehouse Repository baseurl=http://repos.fedorapeople.org/repos/openstack/openstack-liberty/epel-7/ enabled=1 skip_if_unavailable=0 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-liberty priority=98
yum update
cd /path/to/repository/centos/openstack
reposync --repoid=openstack-liberty
createrepo -update /path/to/openstack-liberty
使用两个工具reposync --repoid=openstack-liberty
createrepo -update /path/to/openstack-liberty
原文:http://ting2junshui.blog.51cto.com/975290/1731834