- برای افزایش سرعت دانلود بستههای deb پیشنهاد میشود از ابزار apt-fast استفاده کنید.
- برای نصب در سمت اینترنت :
|
1 |
# /bin/bash -c "$(curl -sL https://git.io/vokNn)" |
- یا اجرای اسکریپت به صورت دستی :
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
#!/bin/bash set -e apt_fast_installation() { if ! dpkg-query --show aria2 >/dev/null 2>&1; then sudo apt-get update sudo apt-get install -y aria2 fi wget https://raw.githubusercontent.com/ilikenwf/apt-fast/master/apt-fast -O /usr/local/sbin/apt-fast chmod +x /usr/local/sbin/apt-fast if ! [[ -f /etc/apt-fast.conf ]]; then wget https://raw.githubusercontent.com/ilikenwf/apt-fast/master/apt-fast.conf -O /etc/apt-fast.conf fi } if [[ "$EUID" -eq 0 ]]; then apt_fast_installation else type sudo >/dev/null 2>&1 || { echo "sudo not installed, change into root context" >&2; exit 1; } DECL="$(declare -f apt_fast_installation)" sudo bash -c "$DECL; apt_fast_installation" fi |
- برای نصب به صورت آفلاین ابتدا بستهی زیر را نصب کنید :
|
1 |
# apt-get install aria2 unzip bash-completion |
- سپس این پرونده را دانلود و به سیستم مورد نظر انتقال نمایید.
- آن را از حالت فشرده خارج کنید :
|
1 2 3 4 5 6 7 8 |
# unzip apt-fast-master.zip # cd apt-fast-master/ # cp apt-fast /usr/local/sbin/ # chmod +x /usr/local/sbin/apt-fast # cp apt-fast.conf /etc # cp completions/bash/apt-fast /etc/bash_completion.d/ # chown root:root /etc/bash_completion.d/apt-fast # . /etc/bash_completion |
- تست شده بر روی Ubuntu 20.04 و 18.04