Chinaunix首页 | 论坛 | 博客
  • 博客访问: 236470
  • 博文数量: 59
  • 博客积分: 2016
  • 博客等级: 大尉
  • 技术积分: 660
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-04 17:30
文章分类
文章存档

2013年(1)

2011年(2)

2010年(7)

2009年(30)

2008年(19)

我的朋友

分类: LINUX

2009-09-02 14:15:16

powerpill

是一个通过aria2c这个多点并行下载工具来加速pacman下载软件的外包式软件。
powerpill的参数同pacman的参数,但是同时又有不同于pacman的特别的参数,暂时没有用到,那就不多说了。
快速安装方法:

1. 在/etc/pacman.conf中增加一个软件源。

代码:
[xyne-any]
Server =


2. 更新源,安装powerpill。

代码:
pacman -Sy powerpill


3. 在/etc/pacman.d/mirrorlist中把注释符号#都去除了,当然也可以直接选择性复制我这里提供的镜像源列表。这些列表源,绝大多数是来自Archlinux镜像检测网中同步最快最稳定,同时也适应我所在上海电信的网络环境。

代码:
Server = ftp://ftp.archlinux.org/$repo/os/i686
Server = ftp://mirrors.easynews.com/linux/archlinux/$repo/os/i686
Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/$repo/os/i686
Server =
Server =
Server = ftp://mirror.csclub.uwaterloo.ca/archlinux/$repo/os/i686
Server = ftp://archlinux.c3sl.ufpr.br/archlinux/$repo/os/i686
Server = ftp://ftp.las.ic.unicamp.br/pub/archlinux/$repo/os/i686
Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/$repo/os/i686
Server = ftp://ftp.sh.cvut.cz/MIRRORS/arch/$repo/os/i686
Server = ftp://ftp.estpak.ee/pub/archlinux/$repo/os/i686
Server = ftp://mir1.archlinuxfr.org/archlinux/$repo/os/i686
Server = ftp://mir2.archlinuxfr.org/archlinux/$repo/os/i686
Server = ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/$repo/os/i686
Server =
Server = ftp://ftp.free.fr/mirrors/ftp.archlinux.org/$repo/os/i686
Server = ftp://ftp.rez-gif.supelec.fr/Linux/archlinux/$repo/os/i686
Server = ftp://ftp.tu-chemnitz.de/pub/linux/archlinux/$repo/os/i686
Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/$repo/os/i686
Server = ftp://ftp.archlinuxppc.org/i686/$repo/os/i686
Server = ftp://ftp5.gwdg.de/pub/linux/archlinux/$repo/os/i686
Server = ftp://ftp.uni-bayreuth.de/pub/linux/archlinux/$repo/os/i686
Server = ftp://ftp.uni-kl.de/pub/linux/archlinux/$repo/os/i686
Server =
Server = ftp://mirrors.uk2.net/pub/archlinux/$repo/os/i686
Server = ftp://ftp.ntua.gr/pub/linux/archlinux/$repo/os/i686
Server = ftp://ftp.mfa.kfki.hu/pub/mirrors/ftp.archlinux.org/$repo/os/i686
Server = ftp://ftp.heanet.ie/mirrors/ftp.archlinux.org/$repo/os/i686
Server = ftp://mi.mirror.garr.it/mirrors/archlinux/$repo/os/i686
Server = ftp://ftp.nluug.nl/pub/metalab/distributions/archlinux/$repo/os/i686
Server = ftp://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/$repo/os/i686
Server =
Server = ftp://mirror.icis.pcz.pl/archlinux/$repo/os/i686
Server =
Server = ftp://ftp.piotrkosoft.net/pub/mirrors/ftp.archlinux.org/$repo/os/i686
Server =
Server = ftp://cesium.di.uminho.pt/pub/archlinux/$repo/os/i686
Server = ftp://ftp.iasi.roedu.net/mirrors/archlinux.org/$repo/os/i686
Server = ftp://mirror.yandex.ru/archlinux/$repo/os/i686
Server =
Server = ftp://ftp.ds.hj.se/pub/os/linux/archlinux/$repo/os/i686
Server = ftp://ftp.gigabit.nu/$repo/os/i686
Server = ftp://archlinux.puzzle.ch/$repo/os/i686
Server = ftp://archlinux.hell.org.ua/archlinux/$repo/os/i686
Server = ftp://ftp.linux.kiev.ua/pub/Linux/ArchLinux/$repo/os/i686
Server =
Server = ftp://mirror.pacific.net.au/linux/archlinux/$repo/os/i686
Server = ftp://ftp.iinet.net.au/pub/archlinux/$repo/os/i686
Server = ftp://mirrors.portafixe.com/archlinux/$repo/os/i686
Server = ftp://mirrors.igprolin-online.org/archlinux/$repo/os/i686
Server = ftp://archlinux.cbn.net.id/pub/archlinux/$repo/os/i686
Server = ftp://mirror.internode.on.net/pub/archlinux/$repo/os/i686
Server = ftp://ftp.klid.dk/archlinux/$repo/os/i686
Server =
Server =
Server = ftp://mirror.lividpenguin.com/pub/archlinux/$repo/os/i686
Server =
Server = ftp://archlinux.igor.onlinedirect.bg/linux/archlinux/$repo/os/i686
Server = ftp://mirrors.hosef.org/archlinux/$repo/os/i686
Server = ftp://ftp.spline.inf.fu-berlin.de/mirrors/archlinux/$repo/os/i686
Server = ftp://mirror.archlinux.cl/$repo/os/i686
Server =
Server =
Server = ftp://cle.linux.org.tw/pub/ArchLinux/$repo/os/i686
Server =
Server = ftp://ftp.indochinalinux.com/archlinux/$repo/i686
Server = ftp://archlinux.puzzle.ch/$repo/os/i686
Server =
Server = ftp://ftp.ntua.gr/pub/linux/archlinux/$repo/os/i686
Server =
#China
Server = http://mirrors.lcuc.org.cn/archlinux/
Server =
Server =
Server =
Server =
Server =
Server =
Server =
Server = ftp://ftp.rez-gif.supelec.fr/Linux/archlinux/$repo/os/i686
Server =
Server =
Server =


4. 最后就是测试速度了,如下代码,只是下载一个大包软件到你的缓存目录中,放心,不会安装这个大包软件的。

代码:
powerpill -Sw --cachedir /tmp openoffice-base(双短线,应该是英文格式记得自己改,但是如果在这里用两个英文短线会被解释成一个短线。)


最 后,嘿嘿,不要骂我,要提醒一点,就是powerpill由于要分析很多镜像服务器,然后再进行多点并行下载,分析时间会比较长一些,这也根据你 mirrorlist中镜像源的多少和快慢了,以及和你的~/.config/powerpill/powerpill.conf的配置。嘿嘿,大家去看看那个配置文件吧,还很容易看明白,然后大家可以提出自己相应的配置,实现是powerpill更快速度!
代码:
# Make sure that you have several mirrors uncommented in your mirrorlist.
# I would recomment at least 10 but you could just as well uncomment
# all of them.


# Global concurrent connection limit. This sets the total number of
# simultaneous connections, not downloads. If set to 0, it will let
# aria2 decide.
# Default: 10
TOTAL_CONNECTIONS = 0 //我改了这里,不知道,可不可能加快。

# Minimum size in MB for using multiple connection to download a file.
# Files smaller than this will NOT be split (not worth it on small files).
# Default: 5 MB
MINIMUM_SIZE = 5

# Maximum number of connections per single file (only applies to files
# equal to or larger than MINIMUM_SIZE). If set to 0, it will let aria2
# decide.
# Default: 0
CONNECTIONS_PER_FILE = 0

# Maximum download speed in bytes/s (0 = unlimited)
# Add 'K' for kB or 'M' for MB, e.g. ('1048576' = '1024K' = '1M')
# Default: 0
MAX_SPEED = 0

# Minimum download speed (0 = no minimum)
# Add 'K' for kB or 'M' for MB, e.g. ('1048576' = '1024K' = '1M')
# Default: 0
MIN_SPEED = 0

# Server timeout
# Default: 15
TIMEOUT = 15

# Maximum tries per download (0 = unlimited)
# Default: 5
MAX_TRIES = 5

# Interval between retries
# Default: 5
RETRY_WAIT = 5

# Passive FTP ('yes'/'no')
# This is overridden by settings in pacman.conf
# Default: yes
PASSIVE_FTP = yes

# Log output ('yes'/'no')
# Default: no
ENABLE_LOG = no

# Log file if logging is enabled
# Default: /var/log/powerpill.log
LOG = /var/log/powerpill.log

# Enable verbose aria2 output?
# Default: no
ARIA2_VERBOSE = no

# Pre-allocate file space? ('none' or 'prealloc')
# Slow and unnecessary for lots of small files.
# Default: none
FILE_ALLOC = none

# Overwrite existing files ('true' or 'false')
# If true, this will overwrite existing cache files even if their
# checksums match, which is rather pointless. See the following
# option for a better alternative.
# Default: false
OVERWRITE = false

# When parsing the requested files, powerpill checks the database
# to get the MD5 checksums and then checks if any of the files
# are already in the cache. If the checksum of the cached file
# matches the database, the file is not downloaded again. If the
# cached file's checksum does NOT match the database, you can set
# powerpill to automatically delete it and redownload it, ask you
# what to do for each file, or leave the file in the cache and
# skip the download.
#
# What to do with cached files with bad checksums ('delete', 'ask', 'leave')
# Default: ask
BAD_CHECKSUM_ACTION = ask

# Use colored messages ('yes' or 'no')
# Default: yes
USE_COLOR = yes

# Show size of individual packages before downloading ('yes' or 'no')
# The total file download size will always be shown. If set to 'no',
# this may be overridden by 'ShowSize' in pacman.conf.
# Default: yes
SHOW_FILE_SIZES = yes

# Additional command line arguments that you always wish to include
# when powerpill is invoked, such as "--nomessages" when wrapping
# powerpill with another script.
# Default: ''
ADDITIONAL_POWERPILL_ARGUMENTS = ''

# Additional arguments to aria2c. Check the aria2 man page.
# Default: '--use-head=false'
ADDITIONAL_ARIA2C_ARGUMENTS = '--use-head=false'

# full path to the pacman binary
# default: /usr/bin/pacman
PACMAN = /usr/bin/pacman

# full path to the aria2c binary
# default: /usr/bin/aria2c
ARIA2C = /usr/bin/aria2c

# Set the pacman configuration file path.
# default: /etc/pacman.conf
DEFAULT_CONF = /etc/pacman.conf

# Set the cache and database paths. These paths are taken relative
# to the specified root (see "man pacman" for more details).
# Normally, these will be relative to "/", so DO NOT PREPEND A
# SLASH ("/").
# default cache: var/cache/pacman/pkg/
# default database: var/lib/pacman/
DEFAULT_CACHE = var/cache/pacman/pkg/
DEFAULT_DATABASE = var/lib/pacman/



二、archlinux中用powerpill加速yaourt
%E4%B8%AD%E7%94%A8powerpill%E5%8A%A0%E9%80%9Fyaourt/
直接讲安装配置,使用powerpill加速pacman,请看我这一篇,可以同时使用的。

1. 编辑/etc/yaourtrc,如果这里没有这个yaourt的配置文件,那么试试~/.yaourtrc,增加如下代码:

代码:
PacmanBin /usr/bin/powerpill


2. 打完收工,就这么简单。

PS:安装yaourt方法
在/etc/pacman.conf中增加一个软件源。
代码:
[archlinuxfr]
Server =

然后执行如下代码:
代码:
pacman -Sy yaourt
阅读(2659) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~