centos8 修改yum源為阿里源(解決安裝 libreoffice無源問題)
查詢centos版本:
cat /etc/redhat-release
首先是到yum源設置文件夾里
1. 查看yum源信息:
yum repolist
2. 定位到base reop源位置
cd /etc/yum.repos.d
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3.下載對應版本的repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
4.清理緩存
yum clean all
5.重建元數據緩存
yum makecache
7. 再次查看yum源信息
yum repolist