[原]ubuntu下制作openstack-havana源
ubuntu下可以用apt-mirror下载openstack的源:
1、安装apt-mirror:
apt-get install apt-mirror
2、配置/etc/apt/mirror.list:
配置/etc/apt/mirror.list
1 ############# config ################## 2 # 3 # set base_path /var/spool/apt-mirror 4 set base_path /home/openstack/havana 5 #set base_path /home/ubuntu-ff 6 # 7 # set mirror_path $base_path/mirror 8 set mirror_path $base_path/mirror 9 # set skel_path $base_path/skel 10 # set var_path $base_path/var 11 # set cleanscript $var_path/clean.sh 12 set defaultarch i386 13 # set postmirror_script $var_path/postmirror.sh 14 # set run_postmirror 0 15 set nthreads 20 16 set _tilde 0 17 # 18 ############# end config ############## 19 deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main 20 deb-src http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main 21 deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-proposed/havana main 22 deb-src http://ubuntu-cloud.archive.canonical.com/ubuntu precise-proposed/havana main 23 24 deb-amd64 http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main 25 deb-src http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main 26 deb-amd64 http://ubuntu-cloud.archive.canonical.com/ubuntu precise-proposed/havana main 27 deb-src http://ubuntu-cloud.archive.canonical.com/ubuntu precise-proposed/havana main
deb会下载defaultarch的所有包,为了下载64位的所有包,只有用deb-amd64。
3、执行脚本下载包:
nohup apt-mirror &
下载的包会放在所指定的路径下:/home/openstack/havana
4、安装Apache:
apt-get install apache2
5、把包的路径放在apache的目录中:
ln -s /home/openstack/havana/mirror/ubuntu-cloud.archive.canonical.com/ubuntu/ /var/www/openstack
6、客户端配置:
mv /etc/apt/source.list /etc/apt/source.list.bak
vim /etc/apt/source.list
deb http://ip/openstack/ precise-updates/havana main
deb-src http://ip/openstack/ precise-updates/havana main
作者:yuandianlws 发表于2014-1-23 15:12:16 原文链接
阅读:75 评论:0 查看评论