Dec 312009

Setelah sebelumnya saya menggunakan AXEL untuk mengantikan WGET, saya langsung mencari tau apakah paket itu bisa digunakan juga untuk menjalankan perintah apt-get. Ternyata memang paket AXEL bisa dikombinasikan untuk proses update dan upgrade

Akhirnya saya terdampar di sebuah situs milik Mas Matt Parnell, yang mengulas tentang penggunaan AXEL untuk kegiatan update dan upgrade, tentunya dengan mengubah dari apt-get menjadi apt-fast. Untuk bisa menggunakannya kita membutuhkan sebuah script yang diberikan oleh pembuatnya. Berikut isi scriptnya:

#!/bin/sh
#apt-fast by Matt Parnell http://www.mattparnell.com , this thing is FOSS
#please feel free to suggest improvments to admin@mattparnell.com
# Use this just like apt-get for faster package downloading. Make sure to have axel installed

#If the first user entered variable string contains apt-get, and the second string entered is either install or dist-upgrade
if echo “$1″ | grep -q “[upgrade]” || echo “$2″ | grep -q “[install]” || echo “$2″ | grep -q “[dist-upgrade]“; then
echo “Working…”;

#Go into the directory apt-get normally puts downloaded packages
cd /var/cache/apt/archives/;

#Have apt-get print the information, including the URI’s to the packages
apt-get -y –print-uris $1 $2 $3 $4 > debs.list;

#Strip out the URI’s, and download the packages with Axel for speediness
egrep -o -e “(ht|f)tp://[^\']+” debs.list | xargs -l1 axel -a;

#Perform the user’s reqested action via apt-get
apt-get -y $1 $2 $3 $4;

echo “Done! Make sure and check to see that the packages all were installed properly. If a package is erred, run sudo apt-get autoclean and try installing it again without the use of this script.”;

elif echo “$1″ | grep -q “[*]“; then
apt-get $1;
else
echo “Sorry, but you appear to be entering invalid options. You must use apt-get and one of apt-get’s options in order to use this script.”;
fi

Silakan ambil disini atau paste di sembarang Teks Editor dan berilah nama apt-fast serta lakukan chmod +x apt-fast pada berkas tersebut. :yes: lalu pindahkan berkas apt-fast tadi ke folder /usr/bin agar script itu bisa digunakan.

Ini tampilan setelah saya menggunakan script tesebut yang dikombinasikan dengan AXEL untuk kegiatan update dan upgrade:

sudo apt-fast upgrade

Cukup mantap bagi koneksi mobile-broadband untuk mendapatkan kecepatan dalam kisaran 20KB/s sampai 60KB/s :cell: Apalagi jika saya gunakan pada koneksi ADSL. 8-) Silakan coba untuk merasakan perbedaannya… :rotfl:

Versi Lain Artikel Ini

*tautan singkat dari artikel ini: 

Beberapa Artikel Yang Jarang Dibaca:

Hanya Mengisi Waktu Luang Daripada Bertindak Kriminal.

3 Responses to “apt-fast dan apt-get”

Comments (2) Pingbacks (1)
  1. Techma says:

    like IDM, huh

    It's awesome

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© CopyLeft Fakhrul Rijal 2009 Suffusion WordPress theme by Sayontan Sinha