CentOS yum配置

  • /etc/yun.repos.d
    清华源:
    https://mirror.tuna.tsinghua.edu.cn/help/centos/
yum clean all
yum makecache
  • /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    source: https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7
rpm --import RPM-GPG-KEY-CentOS-7
//test
yum install vim

opts:

  • proxy
    • /etc/profile
vim /etc/profile
export http_proxy=xxx
export https_proxy=xxx
// :!wq
source /etc/profile
  • /etc/yum.conf
vim /etc/yum.conf
proxy=xxx
//:!wq

你可能感兴趣的:(CentOS yum配置)