初始化centos虚拟机

#停止firewall
systemctl stop firewalld.service 

#禁止firewall开机启动
systemctl disable firewalld.service 

#更换源
yum install -y wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
rpm --rebuilddb
yum makecache

你可能感兴趣的:(初始化centos虚拟机)