#!/bin/bash # #*************************************************************************** # Author: liwanggui # Email: liwanggui@163.com # Date: 2021-12-28 # FileName: centos-stream.sh # Description: CentOS Stream 源修改 # Copyright (C): 2021 All rights reserved #*************************************************************************** # sudo sed -i.bak \ -e 's|^mirrorlist=|#mirrorlist=|' \ -e 's|^#baseurl=|baseurl=|' \ -e 's|http://mirror.centos.org|https://mirrors.aliyun.com|' \ /etc/yum.repos.d/CentOS-*.repo sudo dnf makecache