centos7新系统配置

被刻印的时光 ゝ 提交于 2019-12-07 13:05:34

初始化配置

##关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
##关闭网络管理工具
systemctl stop NetworkManager
systemctl disable NetworkManager
##关闭selinux
setenforce 0
sed -i "s#SELINUX=enforcing#SELINUX=disabled#" /etc/selinux/config

配置镜像

##备份镜像列表文件
cd /etc/yum.repos.d/
mkdir repo_bak && mv *.repo repo_bak/
##下载国内镜像
wget http://mirrors.aliyun.com/repo/Centos-7.repo
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
wget http://mirrors.aliyun.com/repo/epel-7.repo
##重新生成缓存
yum clean all 
yum makecache 
##查看可用镜像源
yum repolist enabled
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!