您的位置:首页 > 理论基础 > 计算机网络

红帽7.2更换网络yum源

2017-11-07 15:54 218 查看
红帽7.2换网络YUM源 方法

卸载软件包

[root@localhost ~]# rpm -aq|grep yum|xargs rpm -e --nodeps
[root@localhost ~]# rpm -aq|grep python-iniparse|xargs rpm -e --nodeps
下载以下软件包
[root@localhost ~]# wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm [root@localhost ~]# wget http://mirrors.sohu.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm [root@localhost ~]# wget http://mirrors.sohu.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm [root@localhost ~]# wget ftp://rpmfind.net/linux/centos/7.3.1611/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm[/code] 安装软件包

[root@localhost ~]# rpm -ivh *

配置163网络yum源
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/7/extras//$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/7/centosplus//$basearch/
gpgcheck=1
enabled=0
OK,成功。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Redhat Yum