Ubuntu can use Apt-mirror to download Ubuntu source and OpenStack source.
Install the download tool Apt-mirror
Apt-get Install Apt-mirror
Modifying the source configuration, using the Souhu source
Vi/etc/apt/mirror.list
Add the following content:
############# config #################### set base_path /var/spool/ Apt-mirror set base_path /home/openstack/ubuntu# set mirror_ path $base _path/mirror# set skel_path $base _path/skel# set var_path $base _path/var# set cleanscript $var _path/clean.sh# set defaultarch <running host architecture># set postmirror_ script $var _path/postmirror.sh# set run_postmirror 0 set nthreads 20 set _tilde 0 deb http://mirrors.163.com/ubuntu / precise main restricted deb http://mirrors.163.com/ubuntu/ precise-updates main restricted deb http://mirrors.163.com/ubuntu/ precise universe deb http://mirrors.163.com/ubuntu/ precise-updates universe deb http://mirrors.163.com/ubuntu/ precise multiverse deb http://mirrors.163.com/ubuntu/ precise-updates multiverse deb Http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ precise-security main restricted deb Http://mirrors.163.com/ubuntu/ precise-security universe deb http://mirrors.163.com/ubuntu / precise-security multiverse deb http://extras.ubuntu.com/ubuntu precise main clean //above is the source of Ubuntu
In the execution apt-mirror
As a local area network source
Installing Apache2
Apt-get Install Apache2
The root directory of the apache2 is:
/var/www/
Ln-s/home/openstack/ubuntu//var/www/ubuntu/
In the client configuration
Vi/etc/apt/source.list
Join:
Deb http://10.10.1.111//precise main restricted deb http://10.10.1.111/ubuntu/precise-updates main restricted Deb http: 10.10.1.111/ubuntu/precise Universe Deb Http://10.10.1.111/ubuntu/precise-updates universe Deb http://10.10.1.111/ Ubuntu/precise Multiverse Deb Http://10.10.1.111/ubuntu/precise-updates Multiverse Deb http://10.10.1.111/ubuntu/ Precise-backports main restricted Universe Multiverse Deb Http://10.10.1.111/ubuntu/precise-security main restricted Deb Http://10.10.1.111/ubuntu/precise-security universe Deb Http://10.10.1.111/ubuntu/precise-security Multiverse
Use the same principle:
Server-side
Configure an OpenStack source
############# config #################### set base_ path /var/spool/apt-mirror set base_path /home/ openstack/icehouse# set mirror_path $base _path/mirror# set skel_path $base _path/skel# set var_path $base _path/var# set cleanscript $var _path/clean.sh# set defaultarch <running host architecture># set postmirror_script $var _path/postmirror.sh# set run_postmirror 0 set nthreads 20deb http:// ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/icehouse maindeb-src http:// Ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/icehouse mainclean ln -s /home/openstack/ubuntu/ /var/www/icehouse/
In the execution apt-mirror
after execution is complete, on the client configuration:
Deb Http://10.10.1.111/ubuntu precise-updates/icehouse main DEB-SRC http://10.10.1.111/ubuntu precise-updates/ Icehouse Main
Complete the configuration.
This article is from the "Gaogaozi" blog, make sure to keep this source http://hangtiangazi.blog.51cto.com/8584103/1663337
Build a local OpenStack (Icehouse) source in the Ubuntu system