CentOS系统/BCLinux系统/openEuler系统如何解决yum源安装问题?---【图示操作步骤更详细】

假如我们有CentOS系统/BCLinux系统的虚机,那么我们在服务器端使用命令时是不是常常报错,以下错误就是其中之一,下面我们一起来看下如何解决使用yum安装命令问题。

CentOS系统/BCLinux系统/openEuler系统如何解决yum源安装问题?---【图示操作步骤更详细】_第1张图片

CentOS系统/BCLinux系统/openEuler系统如何解决yum源安装问题?---【图示操作步骤更详细】_第2张图片

1.首先我们先找到系统的镜像源(一般都是在这个目录下)

cd /etc/yum.repos.d/

CentOS系统/BCLinux系统/openEuler系统如何解决yum源安装问题?---【图示操作步骤更详细】_第3张图片

以防万一-------建议先备份一下镜像源哦~

2.执行以下命令进行更名

mv CentOS-Base.repo CentOS-Base.repoback

CentOS系统/BCLinux系统/openEuler系统如何解决yum源安装问题?---【图示操作步骤更详细】_第4张图片

3.编辑vi CentOS-Base.repo

复制以下内容到CentOS-Base.repo中,执行命令保存退出。

[base] name=Nexus baseurl=http://10.28.149.63:8083/repository/centos7-yum-group/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://10.28.149.63:8083/repository/centos7-yum-group/RPM-GPG-KEY-CentOS-7 [updates] name=CentOS-$releasever-Updates-custom baseurl=http://10.28.149.63:8083/repository/centos7-yum-group/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=

你可能感兴趣的:(centos,linux,运维,服务器)