首页 > 编程知识 正文

linux基本命令,rhel7配置本地yum源

时间:2023-05-05 21:26:22 阅读:19408 作者:4319

1.yum不可用,无法安装gcc,因此需要配置yum源

2 .删除原始的/etc/yum.conf文件和/etc/yum.repo.d目录

rm -rf /etc/yum.conf

RM-RF/etc/yum.repos.d/rhel-debug info.repo

重新配置yum.conf

cachedir=/var/cache/yum

keepcache=1

调试级别=2

logfile=/var/log/yum.log

distroverpkg=redhat-release

种子=1

exactarch=1

obsoletes=1

gpg检查=1

plugins=1

元数据_ expire=1800

# putyourreposhereorinseparatefilesnamedfile.repo

# in /etc/yum.repos.d

name=centos-5 - Base

base URL=http://centos.ustc.edu.cn/centos/5/OS/i386 /

# the other site :http://centos.candis hosting.com.cn/centos/5/OS/i386 /

# youcanfindmoresitein :http://www.centos.org/modules/tiny content/index.PHP? id=13

启用=1

gpg检查=1

#已发布更新

name=centos-5 -更新

base URL=http://mirror.centos.org/centos/5/updates/i386 /

gpg检查=1

# packages used/producedinthebuildbutnotreleased

name=CentOS-5 - Addons

base URL=http://mirror.centos.org/centos/5/addons/$ basearch /

gpg检查=1

# additionalpackagesthatmaybeuseful

name=CentOS-5 - Extras

base URL=http://mirror.centos.org/centos/5/extras/$ basearch /

gpg检查=1

# additionalpackagesthatextendfunctionalityofexistingpackages

name=CentOS-5 - Plus

base URL=http://mirror.centos.org/centos/5/centos plus/$ basearch /

gpg检查=1

启用=0

#contrib - packages by Centos Users

name=CentOS-5 - Contrib

base URL=http://mirror.centos.org/centos/5/contrib/$ basearch /

gpg检查=1

启用=0

#packages in testing

name=CentOS-5 - Testing

base URL=http://mirror.centos.org/centos/5/testing/$ basearch /

gpg检查=1

启用=0

4 .然后测试安装就可以了

yum clean all

yum list

yum -y install gcc gcc-g友好之星/p

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。