1、关闭selinux

setenforce 0
sed -i 's#^SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
getenforce

2、关闭防火墙

systemctl disable firewalld
systemctl stop firewalld

3、关闭NetworkManager

systemctl disable NetworkManager
systemctl stop NetworkManager

4、配置IP地址

vim /etc/sysconfig/network-scripts/ifcfg-ens33

5、配置DNS地址

vim /etc/resolv.conf
nameserver 114.114.114.114

6、修改主机名:

hostnamectl set-hostname HOST-NAME
hostname HOST-NAME

vim /etc/hostname
HOST-NAME

7、修改hosts文件

vim /etc/hosts
127.0.0.1 HOST-NAME
IP HOST-NAME

8、更新Yum源

cd /etc/yum.repos.d/
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sed -i '/aliyuncs/d' CentOS-Base.repo
yum clean all
yum makecache

9、安装常用工具

yum install -y vim net-tools bind-utils lrzsz wget sysstat iotop iftop nc