1. 切换CentOS 8源为阿里源
备份原有的yum源文件,以便需要时恢复:

sudo mv /etc/yum.repos.d/CentOS-* /tmp/
下载并安装阿里云的CentOS 8源配置文件:

sudo curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
生成缓存

sudo yum makecache
更新一下yum源:

yum -y update
如果出现这样(尝试添加 --skip-broken 来跳过无法安装的软件包 或 --nobest 来不只使用最佳选择的软件包)的报错,只需根据提示在命令结尾加上–allowerasing或–nobest后再次执行即可yum -y update --nobest
后续如果这样报错,都可以按照此方法
完成上述步骤后,就将yum镜像源更换为阿里云的了。

2. 关闭防火墙,SELINUX
systemctl stop firewalld.service
systemctl disable firewalld.service
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
关闭之后,查看状态

systemctl status firewalld
systemctl status selinux-autorelabel

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐