Redhat8.0系统
rpm -ivh https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
Centos8.0系统
rpm -ivh https://mirrors.aliyun.com/centos/8.0.1905/extras/x86_64/os/Packages/centos-release-stream-8.0-0.1905.0.9.el8.x86_64.rpm
本地yum源搭建脚本
#/bin/bash
mount /dev/sr0 /mnt
cp -ra /mnt/media.repo /etc/yum.repos.d/local.repo
> /etc/yum.repos.d/local.repo
echo '[BaseOS]' >> /etc/yum.repos.d/local.repo
echo 'name=BaseOS' >> /etc/yum.repos.d/local.repo
echo 'baseurl=file:///mnt/BaseOS' >> /etc/yum.repos.d/local.repo
echo 'gpgcheck=0' >> /etc/yum.repos.d/local.repo
echo 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release' >> /etc/yum.repos.d/local.repo
echo 'enabled=1' >> /etc/yum.repos.d/local.repo
echo -n
echo '[AppStream]' >> /etc/yum.repos.d/local.repo
echo
aliyun yum源的搭建
最新推荐文章于 2024-10-02 10:06:17 发布
本文介绍了如何在Redhat 8.0和Centos 8.0系统中安装阿里云YUM源,并提供了一个本地YUM源搭建的bash脚本,详细说明了配置过程。
摘要由CSDN通过智能技术生成