搜尋此網誌

2017年1月24日 星期二

YUM fastmirror

yum makecache fast
yum install -y yum-plugin-fastestmirror

完成 fastestmirror 的安裝後,要確定已被啟用。
編輯 /etc/yum/pluginconf.d/fastestmirror.conf 並確認擁有下面幾行:

[main]
verbose = 0
socket_timeout = 3
enabled = 1
hostfilepath = /var/cache/yum/timedhosts.txt
maxhostfileage = 1


另外,
大陸區可以先去阿里雲抓取 Mirror 定義檔

cd /etc/yum.repos.d/
wget http://mirrors.aliyun.com/repo/Centos-7.repo
mv CentOS-Base.repo CentOS-Base.repo.bak
cp Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo 

yum clern all
yum makecache fast

驗證一下,看看是否能順利安裝
yum -y install htop iftop multitail

接下來,EPEL 方面
mkdir /root/epel
cd /root/epel
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
yum -y localinstall epel-release-7-9.noarch.rpm

或者是

rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm


- The End -

 參考 https://wiki.centos.org/zh-tw/PackageManagement/Yum/FastestMirror

沒有留言:

張貼留言

搜尋此網誌