以修改aria2最大线程为例,
由于官方将最大线程限制为16,不能得到更高的下载速度。
本例将aria2的最大线程修改至64线程。
用于获得更高的下载速度。
安装依赖,获取源码.
Debian 7 (wheezy):
1 2 3 4 |
cd /tmp apt-get install -y -t wheezy dpkg-dev quilt apt-get source -t wheezy aria2 apt-get build-dep -y -t wheezy aria2 |
Debian 8 (jessie):
1 2 3 4 |
cd /tmp apt-get install -y -t jessie dpkg-dev quilt apt-get source -t jessie aria2 apt-get build-dep -y -t jessie aria2 |
安装完依赖,获取源码后,修改源码后重新构建安装包.
1 2 3 4 5 6 7 |
cd ./aria2-* quilt new 64Threads quilt add ./src/OptionHandlerFactory.cc sed -i s"/1\, 16\,/1\, 64\,/" ./src/OptionHandlerFactory.cc quilt refresh dpkg-buildpackage dpkg -i ../aria2*.deb |
如果你比较懒,不愿自己重新构建安装包。
你很幸运,我给你准备好了!(默默的编译了8遍)
注意:根据自己的机子选择!!!一般64线程足够了。
Debian 7:
1 |
apt-get build-dep -y -t wheezy aria2 |
Debian 8:
1 |
apt-get build-dep -y -t jessie aria2 |
Debian 7 i386 aria2 (v1.15.1) [64线程]:
1 |
wget --no-check-certificate -qO /tmp/aria2_i386_thr64.deb 'https://moeclub.org/attachment/DebianPackage/aria2/64Threads/aria2_1.15.1-1_i386.deb' |
Debian 7 i386 aria2 (v1.15.1) [128线程]:
1 |
wget --no-check-certificate -qO /tmp/aria2_i386_thr128.deb 'https://moeclub.org/attachment/DebianPackage/aria2/128Threads/aria2_1.15.1-1_i386.deb' |
Debian 7 amd64 aria2 (v1.15.1) [64线程]:
1 |
wget --no-check-certificate -qO /tmp/aria2_amd64_thr64.deb 'https://moeclub.org/attachment/DebianPackage/aria2/64Threads/aria2_1.15.1-1_amd64.deb' |
Debian 7 amd64 aria2 (v1.15.1) [128线程]:
1 |
wget --no-check-certificate -qO /tmp/aria2_amd64_thr128.deb 'https://moeclub.org/attachment/DebianPackage/aria2/128Threads/aria2_1.15.1-1_amd64.deb' |
Debian 8 i386 aria2 (v1.18.8) [64线程]:
1 |
wget --no-check-certificate -qO /tmp/aria2_i386_thr64.deb 'https://moeclub.org/attachment/DebianPackage/aria2/64Threads/aria2_1.18.8-1_i386.deb' |
Debian 8 i386 aria2 (v1.18.8) [128线程]:
1 |
wget --no-check-certificate -qO /tmp/aria2_i386_thr128.deb 'https://moeclub.org/attachment/DebianPackage/aria2/128Threads/aria2_1.18.8-1_i386.deb' |
Debian 8 amd64 aria2 (v1.18.8) [64线程]:
1 |
wget --no-check-certificate -qO /tmp/aria2_amd64_thr64.deb 'https://moeclub.org/attachment/DebianPackage/aria2/64Threads/aria2_1.18.8-1_amd64.deb' |
Debian 8 amd64 aria2 (v1.18.8) [128线程]:
1 |
wget --no-check-certificate -qO /tmp/aria2_amd64_thr128.deb 'https://moeclub.org/attachment/DebianPackage/aria2/128Threads/aria2_1.18.8-1_amd64.deb' |
1 |
dpkg -i /tmp/aria2_*.deb |
666666666666666,
默默的占个位置
dalao在debian8上运行命令apt-get build-dep -y -t jessie aria2出错了...提示这样的
E: You must put some 'source' URIs in your sources.list
尝试运行这个后再试试。
bash -c "$(wget –no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/src.sh')"
参考链接