Welcome 微信登录

首页 / 操作系统 / Linux / 搭建Ubuntu 12.04 本地源

搭建Ubuntu 12.04 本地源,彻底实现以后的内网安装OpenStack。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.listgksu 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 updatesudo apt-get install xxxx6. 制作成局域网源安装apaches/var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu/ 作为webroot地址为局域网ip地址即可.更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2修改GNOME Commander默认打开方式Linux命令行下常用svn命令相关资讯      Ubuntu 12.04 
  • Ubuntu 12.04.5 LTS 发布,赶快升  (08/09/2014 07:22:42)
  • 网络电视软件 TV-Maxe 0.09 发布附  (04/20/2014 20:33:17)
  • Ubuntu 12.04和14.04两大版本性能  (02/14/2014 12:03:01)
  • Ubuntu 12.04.5 将在8月7号发布  (07/15/2014 16:37:58)
  • Ubuntu 12.04 LTS安装后3件必须做  (04/13/2014 08:17:09)
  • Ubuntu 12.04.4 发布下载  (02/07/2014 09:25:56)
本文评论 查看全部评论 (0)
表情: 姓名: 字数