redhat7.3配置163 yum源

       redhat 的更新包只對註冊的用戶生效,因此咱們須要本身手動更改爲CentOS 的更新包,CentOS幾乎和redhat是同樣的,因此無需擔憂軟件包是否可安裝,安裝以後是否有問題。node

一、首先刪除redhat原有的yum ,由於redhat 本來的yum 沒有註冊爲redhat用戶是用不了的。python

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

二、下載163的yum 安裝包centos

wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm
wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm
三、安裝下載的rpm包
rpm -ivh *.rpm
四、建立文件/etc/yum.repos.d/rhel-debuginfo.repo並寫入
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/7.3.1611/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7.3.1611/os/x86_64/RPM-GPG-KEY-CentOS-7


#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/7.3.1611/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7.3.1611/os/x86_64/RPM-GPG-KEY-CentOS-7


[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/7.3.1611/extras//$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7.3.1611/os/x86_64/RPM-GPG-KEY-CentOS-7

[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/7.3.1611/centosplus//$basearch/
gpgcheck=1
enabled=0

六、 yum clean all
七、 yum update 測試。 bash

八、 安裝 epel 源 測試

yum install epel-release
相關文章
相關標籤/搜索