在Ubuntu系统中搭建本地openstack(icehouse)源
ubuntu可以利用apt-mirror下载Ubuntu源和openstack源。
安装下载工具apt-mirror
apt-get install apt-mirror
修改源配置,使用souhu源
vi /etc/apt/mirror.list
加入以下内容:
############# 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 //上面加入的是Ubuntu的源
在执行 apt-mirror
作为局域网源
安装apache2
apt-get install apache2
apache2的根目录为:
/var/www/
ln -s /home/openstack/ubuntu/ /var/www/ubuntu/
在客户端配置
vi /etc/apt/source.list
加入:
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
利用同样的道理:
服务器端
配置openstack源
############# 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 20 deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/icehouse main deb-src http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/icehouse main clean ln -s /home/openstack/ubuntu/ /var/www/icehouse/
在执行 apt-mirror
执行完成之后,在客户端配置:
deb http://10.10.1.111/ubuntu precise-updates/icehouse main deb-src http://10.10.1.111/ubuntu precise-updates/icehouse main
完成配置。
本文出自 “gaogaozi” 博客,请务必保留此出处http://hangtiangazi.blog.51cto.com/8584103/1663337
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。