aliyun yum源的搭建
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了aliyun yum源的搭建相关的知识,希望对你有一定的参考价值。
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 ‘name=AppStream‘ >> /etc/yum.repos.d/local.repo
echo ‘baseurl=file:///mnt/AppStream‘ >> /etc/yum.repos.d/local.repo
echo ‘enabled=1‘ >> /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-beta‘ >> /etc/yum.repos.d/local.repo
yum repolist
以上是关于aliyun yum源的搭建的主要内容,如果未能解决你的问题,请参考以下文章