redhat7.2 解決註冊問題 yum

1.刪除原來的yumnode

rpm -aq|grep yum|xargs rpm -e --nodeps python

rpm -aq|grep python-iniparse|xargs rpm -e --nodepscentos


2.下載163的yum 安裝包緩存

wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpmide

wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm   測試

wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm url

wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpmspa


3.安裝下載的rpm包ip

rpm -ivh *.rpmget


4.添加/etc/yum.repos.d/ 的163源

[base]

name=CentOS-$releasever - Base

baseurl=http://mirrors.163.com/centos/7.2.1511/os/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7



#released updates

[updates]

name=CentOS-$releasever - Updates

baseurl=http://mirrors.163.com/centos/7.2.1511/updates/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7



[extras]

name=CentOS-$releasever - Extras

baseurl=http://mirrors.163.com/centos/7.2.1511/extras//$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7


[centosplus]

name=CentOS-$releasever - Plus

baseurl=http://mirrors.163.com/centos/7.2.1511/centosplus//$basearch/

gpgcheck=1

enabled=0


5.清空yum 緩存

yum clean all 


6.測試 

yum 


7.安裝epel 源

yum install epel-release

相關文章
相關標籤/搜索