apt-mirror
对于centos来说,搭建一个本地源,相对来说,还是比较简单的。对于ubuntu来说,就复杂很多,
估计也和我不熟悉有关。
http://unixrob.blogspot.com/2012/05/create-apt-mirror-with-ubuntu-1204-lts.html
上面这个老外的文档,我已经验证了一次,下面是我的过程。
1:安装apt-mirror
这个软件,现在已经在源里,直接安装就可以。
apt-get install apt-mirror
2:设置/etc/apt/mirror.list
装完apt-mirror,就会在/etc/apt/ 目录下产生一个mirror.list 文件。这个文件是需要定制一下。
其实对我来说,我只需要安装64bit的源就可以。不过现在的ubuntu,装完后,运行apt-get update,
他还是需要去找i386的包,所以我需要把ubuntu 12.04 32bit 和64bit的包都下载回来。源码就不下载了。
############# config ##################
#
# set base_path /var/spool/apt-mirror
#
# 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
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
set nthreads 20
set _tilde 0
#
############# end config ##############
# Precise 64Bit Mirror
deb-amd64 http://cn.archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb-amd64 http://cn.archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb-amd64 http://cn.archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse
deb-amd64 http://cn.archive.ubuntu.com/ubuntu precise-proposed main restricted universe multiverse
deb-amd64 http://cn.archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
# Precise 32Bit Mirror
deb-i386 http://cn.archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb-i386 http://cn.archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb-i386 http://cn.archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse
deb-i386 http://cn.archive.ubuntu.com/ubuntu precise-proposed main restricted universe multiverse
deb-i386 http://cn.archive.ubuntu.com/ubuntu precise-backports 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-proposed main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
# Puppet mirror
deb-amd64 http://apt.puppetlabs.com/ precise main
deb-i386 http://apt.puppetlabs.com/ precise main
clean http://cn.archive.ubuntu.com/ubuntu
clean http://apt.puppetlabs.com/
3:开始镜像
apt-mirror /etc/apt/mirror.list
这时候/var/spool/apt-mirror/mirror 下载相应的源。
4:定时更新
默认/etc/cron.d/apt-mirror
如果注释掉,就可以每天都更新。看你的需求,默认是关闭的。
5:客户端使用
由于我是用cobbler来部署ubuntu,可以实现安装的时候,使用本地源,装完系统,默认的源,也是指向本地
apt-mirror的更多相关文章
- 在centos中搭建基于nginx的apt源服务器,整合yum源和apt源在一台服务器
1.首先关闭防护墙或者设置规则通过且关闭selinux 2.nginx-1.14.2版本(编译安装)-自定义安装路径 3.开启nginx目录浏览 以上步骤请参考前文:https://www.cnblo ...
- ubuntu下的apt-get内网本地源的搭建
APT本地源的搭建(可用于局域网apt-get源搭建或者本地源) 本文档介绍使用apt-mirror软件搭建apt本地源 需求:内网开发环境由于其特定原因不能上外网,所以需要本地环境下的内网源来方便开 ...
- Ubuntu 各版本代号简介
起名字是件伤脑筋的事,但是程序猿们似乎最喜欢干伤脑筋的活.Android 的每个版本都有个甜点的别名,而 Ubuntu ,每个版本都有一个更为特色的名字,这个名字由一个形容词和一个动物名称组成,并且, ...
- 创建ubuntu软件源
缘起:虚拟机需要安装一些文件,但是直接从外网下载比较慢,而且安装iso包中是有这些软件的,所以创建一个ubuntu apt server ubuntu 12.04, 本机192.168.0.124, ...
- 使用apt-mirror建立本地debian仓库源
先介绍一下环境: 主机:Win7 虚拟机:VirtualBox + Debian7 由于软件源的体积比较大,所以我又给虚拟机添加了一块50GB的虚拟硬盘(给虚拟机添加虚拟硬盘的方法参见:http:// ...
- 创建本地Ubuntu镜像
参考文档 http://www.howtoforge.com/local_debian_ubuntu_mirror 安装服务 : sudo apt-get install apt-mirror apa ...
- [原]ubuntu下制作openstack-havana源
ubuntu下可以用apt-mirror下载openstack的源: 1.安装apt-mirror: apt-get install apt-mirror 2.配置/etc/apt/mirror.li ...
- 搭建本地Ubuntu 镜像服务器
一.需求分析 最近公司软件Team 有个需求是这样的:能不能在局域网搭建一个Ubuntu 镜像服务器, 这样作的好处是可以节省Ubuntu某些常用工具的安装时间. 二.部署过程 2.1 测试环境 目前 ...
- 制作Ubuntu Kylin局域网源
国人参与开发的开源操作系统UbuntuKylin(http://www.ubuntukylin.com/)已经发布有一段时间了,一直想在单位的局域网内部用用,可惜离线安装比较麻烦,于是搜索了些如何制作 ...
随机推荐
- codevs 3336 电话网络
#include<iostream> #include<cstdio> #include<cstring> #include<queue> #defin ...
- C#中的占位符
当我们需要在屏幕上输出一句话的时候,如果不断的使用+来连接各个字符串,一是容易出错,二是代码显示的非常乱.这时候,占位符就能够发挥作用! 占位符: string name="张三" ...
- OpenXmlSdk导出Excel
感觉OpenXmlSdk的语法真的不是很友好.研究了半天,只实现了简单的导出功能.对于单元格样式的设置暂时还是搞明白,网上的资料真的很少,官方文档是英文的.中文的文章大都是用工具(Open XML S ...
- 织梦DEDECMS小说模块使用和安装全攻略
转之--http://www.51dedecms.com/news/dedecms/2012/0223/3380.html 小说模块功能很强大,可以用他做小说或者漫画站.他们都可以按某章节收费或免费供 ...
- 利用Range改变光标位置
先上代码,代码取自网上某插件中 function caret(begin, end) { if (this.length == 0) return; if (typeof begin == 'numb ...
- Specified VM install not found: type Standard VM, name jdk1.6.0_05
重装系统换了jdk,之前jdk用的1.6,现在改成1.7了.但是更新之后发现ant打包用不了了,报错 Specified VM install not found: type Standard VM, ...
- 【USACO 1.5.1】数字金字塔
[题目描述] 观察下面的数字金字塔. 写一个程序来查找从最高点到底部任意处结束的路径,使路径经过数字的和最大.每一步可以走到左下方的点也可以到达右下方的点. 7 3 8 8 1 0 2 7 4 4 4 ...
- 【USACO 1.3.2】修理牛棚
[描述] 在一个夜黑风高,下着暴风雨的夜晚,farmer John的牛棚的屋顶.门被吹飞了. 好在许多牛正在度假,所以牛棚没有住满. 牛棚一个紧挨着另一个被排成一行,牛就住在里面过夜. 有些牛棚里有牛 ...
- Q我音乐
- RB1001: IE6 IE7 IE8(Q) 负边距 (margin) 导致元素溢出 hasLayout 容器时显示异常
标准参考 根据W3C CSS2.1规范第8.3节中的描述,边距属性设置了一个框的边距区的宽度.'margin' 缩写属性设置所有四边的边距,而其它的边距属性( 'margin-top' ,'margi ...