Redhat7.6 yum源替换阿里yum源
1.下载所需要的rpm安装包(可能有些包之间的小版本号不一样,可以直接去阿里云上下载)
https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-50.el7.noarch.rpm
wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-9.el7.noarch.rpm
2.查询yum包和删除yum现有rpm包,删完以后再查看一下,是否删除干净,删除完成后安装刚刚下载好的rpm包,yum包安装时必须取消依赖关系和强制安装
rpm -qa | grep yum
rpm -qa | grep yum | xargs rpm -e --nodeps
rpm -ivh python-urlgrabber-3.10-9.el7.noarch.rpm
rpm -ivh yum-* --force --nodeps
3.将现有的redhat .repo的包重命名,再下载阿里云的.repo到/etc/yum.repos.d目录下
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4.修改刚下载的.repo文件,将里面所有$releasever替换为7
vim CentOS-Base.repo
:%s/$releaserver/7/g --/g 表示一行当中如果出现了多次,每一次都替换
5.运行以下命令
yum clean all
yum makecache
yum update
- redhat 升级gdb7.6
- redhat中设置环境变量PATH的方法
- redhat7配置vim+ctags+cscope
- GDB7.6 Remote 'g' packet reply is too long
- redhat6.3安装Keepalived+LVS
- redhat linux svn server 搭建过程
- RedHat Enterprise Linux Server release 7 语言设置
- Redhat6.4 网卡别名问题
- redhat EL6.5安装mysql5.7及常见问题
- Redhat 5 中裸设备(raw) 的配置
- linux redhat6.5上安装jdk1.7及环境变量的配置
- RedHat Enterprise Linux 6配置Xmanager 4
- [Step by step] Redhat 7.3 PXE boot from OmniPath
- redhat 6配置163 yum源
- 【GDOI2018模拟7.6】吃干饭
- REDHAT解决apt-get问题
- 【JZOJ 5204】【GDOI2018模拟7.6】吃干饭
- Redhat下VNC SERVER的配置
- VMware Workstation Pro12安装RedHat6.4 64位
- Redhat6.1下安装yum(图文)