当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 备份个自己的ubuntu9.04的源在这里
帖子发表于 : 2009-05-25 5:20 
头像

注册: 2009-03-19 9:19
帖子: 1423
地址: 江苏
送出感谢: 0 次
接收感谢: 2
1. 首先先安裝 apt-p2p

sudo apt-get install apt-p2p

2. 接著先備份軟體來源設定檔(source.list)

sudo cp /etc/apt/sources.list /etc/apt/sources.list-apt-p2p-backup

3. 編輯 souece.list 檔案,將每行的「http://」替換為「http://localhost:9977/」

sudo gedit /etc/apt/sources.list

deb http://localhost:9977/archive.ubuntu.com/ubuntu/ jaunty main universe restricted multiverse
deb http://localhost:9977/security.ubuntu.com/ubuntu/ jaunty-security universe main multiverse restricted
deb http://localhost:9977/ftp.twaren.net/ubuntu jaunty main universe restricted multiverse
……以下省略、依此類推……

4. 更新套件資訊

sudo apt-get update

此時已大功告成。好奇的話,可以使用瀏覽器開啟 http://localhost:9977/ 頁面,看看 apt-p2p 的運作狀況。

我的使用經驗是,有超過 98% 的流量會透過 apt-p2p 從其他 peers 那邊抓,只剩一點點會回到各個 Repository 那邊去下載。

代码:


# deb cdrom:[Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1)]/ jaunty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://ubuntu.cn99.com/ubuntu/ jaunty main restricted
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu.cn99.com/ubuntu/ jaunty-updates main restricted
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu.cn99.com/ubuntu/ jaunty universe
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty universe
deb http://ubuntu.cn99.com/ubuntu/ jaunty-updates universe
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ubuntu.cn99.com/ubuntu/ jaunty multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty multiverse
deb http://ubuntu.cn99.com/ubuntu/ jaunty-updates multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://cn.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu jaunty partner
# deb-src http://archive.canonical.com/ubuntu jaunty partner

deb http://ubuntu.cn99.com/ubuntu/ jaunty-security main restricted
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-security main restricted
deb http://ubuntu.cn99.com/ubuntu/ jaunty-security universe
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-security universe
deb http://ubuntu.cn99.com/ubuntu/ jaunty-security multiverse
deb http://packages.medibuntu.org/ jaunty free non-free #medibuntu
deb http://ppa.launchpad.net/shutter/ppa/ubuntu jaunty main #shutter
deb-src http://ubuntu.cn99.com/ubuntu/ jaunty-security multiverse

deb http://us.archive.ubuntu.com/ubuntu edgy universe
deb http://wine.budgetdedicated.com/apt edgy main

deb http://dl.google.com/linux/deb/ stable non-free #google
#国外官方源P2P来升级Ubuntu
deb http://security.ubuntu.com/ubuntu/ jaunty-security universe main multiverse restricted
deb http://localhost:9977/archive.ubuntu.com/ubuntu/ jaunty main universe restricted multiverse
deb http://localhost:9977/archive.ubuntu.com/ubuntu/ jaunty-updates universe main multiverse restricted
deb http://localhost:9977/archive.ubuntu.com/ubuntu/ jaunty-backports universe main multiverse restricted
deb http://localhost:9977/archive.canonical.com/ubuntu jaunty partner

#Archive.ubuntu.com更新服务器(欧洲,此为官方源,电信网通用户使用):
deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse





_________________


最后由 mickeywaley 编辑于 2009-05-25 5:27,总共编辑了 1 次

页首
 用户资料  
 
2 楼 
 文章标题 : Re: 备份个自己的ubuntu9.04的源在这里(修改后apt-p2p)
帖子发表于 : 2009-05-25 5:25 
头像

注册: 2009-03-19 9:19
帖子: 1423
地址: 江苏
送出感谢: 0 次
接收感谢: 2
代码:
# deb cdrom:[Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1)]/ jaunty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://localhost:9977/packages.medibuntu.org/ jaunty free non-free #medibuntu
deb http://localhost:9977/ppa.launchpad.net/shutter/ppa/ubuntu jaunty main #shutter

#deb http://localhost:9977/us.archive.ubuntu.com/ubuntu edgy universe #貌似连接解不了了,先K掉
deb http://localhost:9977/wine.budgetdedicated.com/apt edgy main

deb http://localhost:9977/dl.google.com/linux/deb/ stable non-free #google
#国外官方源P2P来升级Ubuntu
deb http://security.ubuntu.com/ubuntu/ jaunty-security universe main multiverse restricted
deb http://localhost:9977/archive.ubuntu.com/ubuntu/ jaunty main universe restricted multiverse
deb http://localhost:9977/archive.ubuntu.com/ubuntu/ jaunty-updates universe main multiverse restricted
deb http://localhost:9977/archive.ubuntu.com/ubuntu/ jaunty-backports universe main multiverse restricted
deb http://localhost:9977/archive.canonical.com/ubuntu jaunty partner


_________________


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译