在Ubuntu系統上使用YUM需注意其非默認工具屬性,以下為針對性優化建議:
apt update
/apt install
替代YUM命令。/etc/yum.conf
,設置keepcache=1
。yum clean expire-cache
或設置cron任務自動清理。/etc/yum.repos.d/*.repo
,僅保留必要倉庫,替換為國內高速鏡像源(如清華源)。yum-config-manager
禁用非必要倉庫:sudo yum-config-manager --disable <repo_id>
。/etc/yum.conf
中設置max_parallel_downloads=5
(數值根據網絡調整),或安裝yum-presto
插件加速。yum autoremove
清理無用依賴包,避免冗余。?? 注意:YUM與Ubuntu的APT可能存在依賴沖突,非必要場景建議直接使用APT工具。