Ubuntu10.04制作官方源镜像以及搭建本地
来源:互联网 发布:唐嫣紫霞仙子 知乎 编辑:程序博客网 时间:2024/06/16 16:35
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地址即可.
不能上网、网速慢、共享等等需求,使我们不能或者不想使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地址即可.
- Ubuntu10.04制作官方源镜像以及搭建本地
- ubuntu10.04搭建openvpn
- ubuntu10.04 nfs搭建
- Ubuntu 14.04 制作本地源镜像 搭建 apt-get 服务器
- Ubuntu10.04 搭建DNS服务器
- ubuntu10.04tftp服务器搭建
- ubuntu10.04搭建web环境
- ubuntu10.04 gtk环境搭建
- ubuntu10.04 android环境搭建
- virtualBox ubuntu10.04 搭建环境
- ubuntu10.04搭建ftp server
- ubuntu10.04 搭建 samba服务
- ubuntu10.04创建本地apt-get服务器
- ubuntu10.04 eclipse C/C++平台搭建
- ubuntu10.04 下LAMP的搭建安装
- ubuntu10.04的JSP环境搭建
- Ubuntu10.04 Android开发环境搭建
- Ubuntu10.04搭建Git服务器和GitWeb
- ExecutorService常用方法和newFixedThreadPool创建固定大小的线程池
- windows下如何安装java6.0
- 游戏引擎列表
- assert()函数用法总结
- Android中Service与Thread的区别
- Ubuntu10.04制作官方源镜像以及搭建本地
- LSI设计(2)布局算法(待上载)
- 3天学习haskell---haskell第二天
- c/c++中extern用来声明全局变量
- LSI设计(3)布线算法(待上载)
- Java上路19-I/O-常用类
- LSI设计(4)FOCR快速最优通道布线
- 博弈进行时~
- Visual Studio 2005各试用版官方下载地址 .