# 安装软件包
yum install -y vim net-tools curl wget epel-release lrzsz
# 关闭selinux
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
# 关闭防火墙、Networkmanager、postfix
systemctl stop firewalld
systemctl stop NetworkManager
systemctl disable firewalld
systemctl disable NetworkManager
systemctl stop postfix
systemctl disable postfix
# yum优化
sed -i '/enabled/s/1/0/' /etc/yum/pluginconf.d/fastestmirror.conf
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 https://mirrors.aliyun.com/repo/Centos-7.repo
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo