更新系统,并且安装wget

yum update
yum install wget -y

使用阿里的yum源替换系统默认的yum源

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 makecache

安装系统必备组件

yum install telnet perl perl-devel net-tools kernel-devel -y
yum groupinstall "Development tools" -y

CentOS 7的防火墙关闭和iptables安装

CentOS 7.0默认使用的是firewall作为防火墙,但可能一下子很难适应,让我们先改回原先的iptables防火墙吧!

关闭CentOS 7的firewall:

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

启动iptables防火墙

systemctl restart iptables.service #最后重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动