உபுண்டுவில் மென்பொருட்களை நிறுவ வேண்டும் என்றால் நாம் software center சென்று நிறுவுவோம். அப்பொது அதன் தரவிறங்கும் நேரம் சற்று அதிகமாகும். டெர்மினலில் apt-get மூலம் மென்பொருட்களை நிறுவினால் அது wget மூலம் பேக்கேஜ்களை தரவிறக்கி நம்முடைய கணினியில் நிறுவும்.
இதற்கு பதிலாக axel, prozilla, aria2c போன்ற download acceleratorகளை பயன்படுத்தி தரவிறக்கினோம் என்றால் இன்னும் சற்று அதிகமான வேகத்தில் தரவிறக்க முடியும். இந்த download acceleratorகள் parallel download எனும் முறையை பயன்படுத்து ஒரே fileஇனை பல்வேறு பகுதிகளாக பிரித்து தரவிறக்கி பிறகு சேர்க்கும் எனவே இவை சாதாரண டவுண்லோட் மேனேஜரை காட்டிலும் வேகமாக இருக்கும். இந்த script நம்முடைய apt-get
repositoryஇனை wget பதிலாக axel கொண்டு தரவிறக்குமாறு எழுதப்பட்டுள்ளது.
இதனை உபயோகிக்கும் முன் நமது கணினியில் axel அல்லது aria2c இருக்க வேண்டும். (இல்லை என்றாலும் script runசெய்யும் போது தானாக நிறுவிடும்) அதற்கு
axel நிறுவ:
$sudo apt-get install axel
aria2c நிறுவ:
$sudo apt-get install aria2c
என்று டெர்மினலில் தரவும்.
பிறகு கீழே உள்ள scriptஐ காபி செய்து apt-fast எனும் பெயரில் சேமிக்கவும். பிறகு அதனை /us/bin க்கு கொண்டு செல்ல வேண்டும்.
$sudo mv apt-fast /usr/bin/apt-fast
அடுத்து அதற்கு execute permission தர
$sudo chmod +x /usr/bin/apt-fast
apt-get கொண்டு என்னென்ன செய்ய முடியுமோ அனைத்தையும் apt-fastல் செய்யலாம்.
உதாரணத்திற்கு firefox நிறுவ
$sudo apt-fast install firefox
அல்லது upgrade செய்ய
$sudo apt-fast upgrade
githubலிருந்து கோடினை தரவிறக்கிகொள்ளவும்.
https://github.com/ilikenwf/apt-fast
விருப்பமான download managerஐ தேர்ந்தெடுக்க அதனை uncomment செய்யவும். axelஐ தேர்ந்தெடுக்க அதன் முன் உள்ள # symbolஐ எடுத்துவிடவும் அவ்வளவுதான்.
இதற்கு பதிலாக axel, prozilla, aria2c போன்ற download acceleratorகளை பயன்படுத்தி தரவிறக்கினோம் என்றால் இன்னும் சற்று அதிகமான வேகத்தில் தரவிறக்க முடியும். இந்த download acceleratorகள் parallel download எனும் முறையை பயன்படுத்து ஒரே fileஇனை பல்வேறு பகுதிகளாக பிரித்து தரவிறக்கி பிறகு சேர்க்கும் எனவே இவை சாதாரண டவுண்லோட் மேனேஜரை காட்டிலும் வேகமாக இருக்கும். இந்த script நம்முடைய apt-get
repositoryஇனை wget பதிலாக axel கொண்டு தரவிறக்குமாறு எழுதப்பட்டுள்ளது.
இதனை உபயோகிக்கும் முன் நமது கணினியில் axel அல்லது aria2c இருக்க வேண்டும். (இல்லை என்றாலும் script runசெய்யும் போது தானாக நிறுவிடும்) அதற்கு
axel நிறுவ:
$sudo apt-get install axel
aria2c நிறுவ:
$sudo apt-get install aria2c
என்று டெர்மினலில் தரவும்.
பிறகு கீழே உள்ள scriptஐ காபி செய்து apt-fast எனும் பெயரில் சேமிக்கவும். பிறகு அதனை /us/bin க்கு கொண்டு செல்ல வேண்டும்.
$sudo mv apt-fast /usr/bin/apt-fast
அடுத்து அதற்கு execute permission தர
$sudo chmod +x /usr/bin/apt-fast
apt-get கொண்டு என்னென்ன செய்ய முடியுமோ அனைத்தையும் apt-fastல் செய்யலாம்.
உதாரணத்திற்கு firefox நிறுவ
$sudo apt-fast install firefox
அல்லது upgrade செய்ய
$sudo apt-fast upgrade
githubலிருந்து கோடினை தரவிறக்கிகொள்ளவும்.
https://github.com/ilikenwf/apt-fast
விருப்பமான download managerஐ தேர்ந்தெடுக்க அதனை uncomment செய்யவும். axelஐ தேர்ந்தெடுக்க அதன் முன் உள்ள # symbolஐ எடுத்துவிடவும் அவ்வளவுதான்.
# !/bin/sh # apt-fast v1.4 by Matt Parnell http://www.mattparnell.com, GNU GPLv3 # Use this just like apt-get for faster package downloading. ################################################################### # CONFIGURATION OPTIONS # ################################################################### # Maximum number of connections _MAXNUM=5 # Note that the download manager you choose has other options - feel free # to setup your own _DOWNLOADER line or customize one of the ones below... # they're simply there for example purposes, and to provide sane defaults # Download manager selection (choose one by uncommenting one #_DOWNLOADER line) # aria2c: #_DOWNLOADER='aria2c -c -j ${_MAXNUM} --input-file=/tmp/apt-fast.list --connect-timeout=600 --timeout=600 -m0' # aria2c with a proxy (set username, proxy, ip and password!) #_DOWNLOADER='aria2c -s 20 -j ${_MAXNUM} --http-proxy=http://username:password@proxy_ip:proxy_port -i apt-fast.list' # axel: #_DOWNLOADER='cat /tmp/apt-fast.list | xargs -l1 axel -n ${_MAXNUM} -a' # axel ################################################################### # DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING! # ################################################################### _unlock() { rm -f $LCK_FILE } # Check for proper priveliges [ "`whoami`" = root ] || exec sudo "$0" "$@" # Define our lock location LCK_FILE=/var/lock/apt-fast.lck lockfile-create -r 0 -q -l "${LCK_FILE}" || { echo "Either you stopped apt-fast in the middle of work or it's already running." echo "If you think apt-fast isn't running, you may delete /var/lock/apt-fast.lck and try again." exit 100 } trap " [ -f ${LCK_FILE} ] && _unlock" 0 1 2 3 13 15 # Make sure one of the download managers is enabled [ -z "$_DOWNLOADER" ] && echo "You must configure apt-fast to use axel or aria2c" && _unlock && exit 1; # If the user entered arguments contain upgrade, install, or dist-upgrade if echo "$@" | grep -q "upgrade\|install\|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 # Strip out the URI's, and download the packages with Axel for speediness # I found this regex elsewhere, showing how to manually strip package URI's you may need...thanks to whoever wrote it apt-get -y --print-uris $@ | egrep -o -e "(ht|f)tp://[^\']+" > /tmp/apt-fast.list eval ${_DOWNLOADER} # Install our downloaded packages apt-get $@; echo -e "\nDone! Verify that all packages were installed successfully. If errors are found, run apt-get clean as root and try again using apt-get directly.\n"; else apt-get $@; fi # Remove our lock _unlock
Comments
Post a Comment