@【Centos6.8 yum仓库配置问题记录及暂时解决方法】
1.问题记录:
配置Hadoop集群时提示rsync无效,测试无法使用yum命令安装,遂回头安装yum源。出现以下问题:
(1)CentOS 6.x 版本在2020年11月30日停止了维护更新,官方源已经没有用了,部分镜像源也没用了,需要替换新的源。
(2)制作本地yum源时,ISO挂载重启失效,修改配置文件/etc/fstab映射关系后,仍无法正常安装(挂在正常)
//
[root@hadoop102 yum.repos.d]# vi CentOS-Base.repo
[root@hadoop102 yum.repos.d]# yum clean all
已加载插件:fastestmirror, refresh-packagekit
Cleaning repos: base extras updates
清理一切
Cleaning up list of fastest mirrors
[root@hadoop102 yum.repos.d]# yum repolist
已加载插件:fastestmirror, refresh-packagekit
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/extras/mirrorlist.txt
base | 4.0 kB 00:00 ...
base/primary_db | 4.7 MB 00:00 ...
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/updates/mirrorlist.txt
仓库标识 仓库名称 状态
base CentOS-local 6,696
extras CentOS-6 - Extras 0
updates CentOS-6 - Updates 0
repolist: 6,696
[root@hadoop102 yum.repos.d]# yum install httpd
已加载插件:fastestmirror, refresh-packagekit
设置安装进程
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/extras/mirrorlist.txt
错误:Cannot find a valid baseurl for repo: extras
2 尝试解决方法
- 1.关联网络yum源
cd /etc/yum.repos.d/
vi CentOS-Base.repo
把源站点配置改为国内清华大学站点https://mirrors.tuna.tsinghua.edu.cn/centos-vault
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address