Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

CentOS VPS 下 yum 下載緩慢?安裝 Axel 多線程插件大幅加速

編輯:Linux 教學

許多 VPS 使用者在操作 CentOS 時,常會遇到 yum 套件下載速度極慢的情況,特別是國外源在國內訪問時。這不僅浪費時間,也影響部署效率。針對此問題,安裝 Axel 多線程下載插件是一個行之有效的解決方案。Axel 能將單一檔案拆分為多個片段,透過多條 HTTP/FTP 連線並行下載,顯著提升傳輸速度。

快速安裝步驟

1. 安裝 Axel 本體

wget -c https://wp.cdn.gongzi.org/soft/axel-2.4-1.el5.rf.i386.rpm
rpm -ivh axel-2.4-1.el5.rf.i386.rpm

2. 部署 yum 插件配置檔

cd /etc/yum/pluginconf.d/
wget https://cnfreesoft.googlecode.com/svn/trunk/axelget/axelget.conf

cd /usr/lib/yum-plugins/
wget https://cnfreesoft.googlecode.com/svn/trunk/axelget/axelget.py

請確認 /etc/yum.conf 中已啟用插件功能:plugins=1。

3. 安裝 fastestmirror 插件(自動選擇最快鏡像源)

yum install -y yum-fastestmirror

效果驗證

完成上述步驟後,再次執行 yum install 或 yum update,即可觀察到下載速度明顯提升。結合 fastestmirror 自動匹配最優節點,雙管齊下,徹底解決 yum 下載緩慢的痛點。

Copyright © Windows教程網 All Rights Reserved