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
總結
以上是生活随笔為你收集整理的Ubuntu10.04制作官方源镜像以及搭建本地源的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Sybase用户登录以后的自动运行脚本
- 下一篇: 梦到门牙和大牙掉了是什么意思