Ubuntu10.04制作官方源镜像以及搭建本地源

不能上网、网速慢、共享等等需求,使我们不能或者不想使Ubuntu10.04在线安装软件包,而是需要一个本地的更新源。通过apt-mirror工具,我们可以轻松制作官方源的本地镜像,通过本地镜像,我们可以本地安装更新软件.

1. 安装apt-mirror工具

sudo apt-get install apt-mirror

或者下载源码编译,不过推荐apt安装.方法自行摸索.

 

2. 配置apt-mirror工具

gksu gedit /etc/apt/mirrors.list

清除原有内容,没关系,输入以下内容:

set nthreads     20
set _tilde 0
#
############# end config ##############
deb http://mirrors.sohu.com/ubuntu/ lucid main universe restricted multiverse
deb http://mirrors.sohu.com/ubuntu/ lucid-security universe main multiverse restricted
deb http://mirrors.sohu.com/ubuntu/ lucid-updates universe main multiverse restricted
deb http://mirrors.sohu.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://mirrors.sohu.com/ubuntu/ lucid-backports universe main multiverse restricted

clean http://mirrors.sohu.com/ubuntu

这里的地址规则和sources.list中是一样的,用的是sohu的镜像,内容很全的,与官方同步的.

 

3. 开始制作

sudo apt-mirror

大概会显示

Downloading 80 index files using 20 threads...
Begin time: Fri Mar 30 21:47:40 2012
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Fri Mar 30 21:47:57 2012

Proceed indexes: [PPPPP]

44 GiB will be downloaded into archive.
Downloading 4388 archive files using 20 threads...


制作完成后会有提示,制作过程可以中断,之后再次运行apt-mirror会继续以前的工作.每次都可以这样更新.

此过程根据网速不同,会有不同的时间.网速快的话,1个晚上就能完成.

 

4. 作为本地源头更新

制作完成后,在本地存储的地址为:/var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu

编辑sources.list

gksu gedit /ets/apt/sources.list

删除原有内容,写入:

deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu/ lucid main universe restricted multiverse  
deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu/ lucid-security universe main multiverse restricted  
deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu/ lucid-updates universe main multiverse restricted  
deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu/ lucid-proposed universe main multiverse restricted  
deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu/ lucid-backports universe main multiverse restricted 

 

5. 本地安装软件包

sudo apt-get update

sudo apt-get install xxxx

 

6. 制作成局域网源

安装apaches

/var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu/ 作为webroot

地址为局域网ip地址即可.

转自 http://www.cnblogs.com/linucos/archive/2012/03/31/2426662.html

转载于:https://www.cnblogs.com/zbunix/archive/2013/04/28/3048894.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/402778.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

学习《css世界》笔记之使用vertical-align数值实现文字和小图标对齐

效果图 HTML <p>请选择<i class"icon-arrow"></i></p> <p>请选择<i class"icon-arrow valing-1"></i></p> <p>请选择<i class"icon-arrow valing-2"></i></p>CSS .i…

dll 和 lib--初级

今天碰到一个奇怪的问题&#xff0c;一个第三方的库&#xff0c;提供了A.dll和A.lib,编译的时候可以通过&#xff0c;运行的时候一直报错&#xff0c;说找不到A.dll。 我就在main函数那里设了断点&#xff0c;发现没有进main 函数的时候就已经报错了&#xff0c;应该是在入口函…

[Mac] php安装protobuf扩展

环境: mac os x 10.10.3 [zcmGatewayWorker 19]$php -v PHP 7.2.5 (cli) (built: May 1 2018 09:50:45) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologieswith Xdebug v2.6.0, Copyright (c) 2002-2018, by De…

MS SQL 能否修改实例名称

前几天研究了了一下修改数据库名称的方式后&#xff0c;今天突然冒出一个问题&#xff0c;MS SQL的命名实例是否也可以修改呢&#xff1f;例如下图&#xff0c;我在本机上安装了一个命名实例GSP&#xff0c;如果我想将其改为GSPS&#xff0c;能行吗&#xff1f; 如果可以&#…

MYSQL数据库时间字段INT,TIMESTAMP,DATETIME性能效率比较

from: http://www.piaoyi.org/database/MYSQL-INT-TIMESTAMP-DATETIME.html Author&#xff1a;飘易 Source&#xff1a;飘易 Categories&#xff1a;数据库 PostTime&#xff1a;2016-10-28 13:12:22 正 文&#xff1a; 在数据库设计的时候&#xff0c;我们经常会需要设计时…

学习《css世界》笔记之使用overflow做文字溢出点点点效果

效果图 HTML <p class"p1">qwertyuiopasdfghjklzxcvbnm</p><div class"d1"><p> 冯塘村过去经济较为落后。几年前&#xff0c;镇里以400多年的冯塘古村为基础&#xff0c;引来社会资金投资休闲农庄和共享民宿&#xff0c;把这里建…

关于 部署方面研究 Visual Studio 2013

InstallShield2013LimitedEdition 下载地址 http://download.csdn.net/download/yuanyuan_186/7681385 转载于:https://www.cnblogs.com/tianheBologs/p/5996361.html

Portal-Basic Java Web 应用开发框架:应用篇(十四) —— 异步 Action

Portal-Basic Java Web应用开发框架&#xff08;简称 Portal-Basic&#xff09;是一套功能完备的高性能Full-Stack Web应用开发框架&#xff0c;内置稳定高效的MVC基础架构和DAO框架&#xff08;已内置Hibernate、MyBatis和JDBC支持&#xff09;&#xff0c;集成 Action拦截、F…

类似No module named 'bs4'等错误的解决方法

from: https://www.cnblogs.com/xisheng/p/7856334.html 最近开始接触爬虫&#xff0c;写了如下源代码&#xff1a; from bs4 import BeautifulSoup import requests urlhttps://www.tripadvisor.cn/Attractions-g60763-Activities-New_York_City_New_York.html wb_datereque…

C. Vanya and Scales

C. Vanya and Scalestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya has a scales for weighing loads and weights of masses w0, w1, w2, ..., w100 grams where w is some integer not less than 2(exac…

js_组合继承(最常用的继承方式)

<script type"text/javascript">//组合继承: 将原型链和借用构造函数的技术组合在一起//使用原型链实现对原型方法的继承//使用构造函数实现对实例属性的继承//js中最常用的继承方式//super:超类function SuperType(name) {//超类属性//使用构造函数实现对实例…

Hello World(本博客启程篇)

Hello World 作为本博客第一篇日志&#xff0c;作为程序员&#xff0c;无论走到哪里&#xff0c;做什么事&#xff0c;必须先输出这句话。 一个想法  从今天3月份到现在一直在学技术&#xff0c;过程中坑的解决、知识的总结以及想法等都写到了“有道云笔记”。 写有道云笔记的…

php7.2 event扩展php_sockets_le_socket错误解决

环境: [rootlocalhost php.d]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) [rootlocalhost php.d]# php -v PHP 7.2.10 (cli) (built: Sep 15 2018 07:10:58) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-201…

NYOJ_37_回文字符串

首先&#xff0c;我们把字符串反转&#xff0c;然后用反串和原串求最大公共子序列&#xff0c;再用字符串长度减去最大公共子序列的长度就是答案&#xff0c;我们还可以用滚动数组优化内存 状态转移方程&#xff1a; (i长度的a串和j长度的b串的最长公共子序列长度&#xff09; …

js中的Object.create(null) 和 {} 的区别

console.log(Object.create(null))console.log({})结果图 根据结果我们不难发现&#xff0c;两者最大区别在于Object.create(null)创建的对象没有继承Object 所有Object.create(null)创建的对象也没有Object提供的方法&#xff0c;是一个非常纯净的对象 ps: Object.create(obj…

matplotlib —— 添加文本信息(text)

matplotlib.pyplot.text(x, y, s, fontdictNone, withdashFalse, **kwargs) x, y&#xff1a;表示坐标&#xff1b;s&#xff1a;字符串文本&#xff1b;fontdict&#xff1a;字典&#xff0c;可选&#xff1b;kw&#xff1a; fontsize12,horizontalalignment‘center’、ha’c…

值得推荐的C/C++框架和库 (真的很强大)

From: https://blog.csdn.net/u011628751/article/details/69258637/ 值得学习的C语言开源项目 - 1. Webbench Webbench是一个在Linux下使用的非常简单的网站压测工具。它使用fork()模拟多个客户端同时访问我们设定的URL&#xff0c;测试网站在压力下工作的性能&#xff0c;…

java web 中的转发和重定向路径问题

为什么80%的码农都做不了架构师&#xff1f;>>> 假设应用程序的 contextPath 为 /ctx&#xff0c;在 http://localhost:8080/ctx/a/b 资源中&#xff0c;我们转发和重定向到 http://localhost:8080/ctx/x/y 资源&#xff0c;分别应该怎么写&#xff1f; 转发&…

断言assert使用方法

测试代码 console.log(开始)console.assert(true, true)console.assert(false,false)console.log(结束)结果 可以发现&#xff1a; assert方法中&#xff0c;第一个参数是判断条件&#xff0c;当为true时&#xff0c;不执行 。当为false时&#xff0c; 输出后面提示内容 且我们…

AngularJs学习笔记(四)

1、AngularJs中的Module可以包含哪些组件&#xff1f;&#xff08;1&#xff09;value&#xff1a;保存可以在不同的controller之间共享的对象、数据&#xff08;2&#xff09;constant&#xff1a;保存可以在不同的controller之间共享的常量&#xff08;3&#xff09;service&…