1、修改网络配置
# cat /etc/sysconfig/network-scripts/ifcfg-eno16777736 BOOTPROTO=static ONBOOT=yes IPADDR= NETMASK= GATEWAY= DNS1=
2、关闭防火墙
# systemctl stop firewalld # systemctl disable firewalld
3、关闭selinux
# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
4、修改主机名
# echo test > /etc/hostname
5、配置本地yum源
# cd /etc/yum.repos.d/ # mkdir bak ;mv * bak # mv bak/CentOS-Media.repo # cat CentOS-Media.repo [c7-media] name=CentOS-$releasever - Media baseurl=file:///media/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 # mount /dev/cdrom /media/
6、安装常用软件
# yum install wget vmstat lrzsz vim net-tools ntpdate traceroute tree lsof bind-utils telnet -y
7、配置网络源
# cd /etc/yum.repos.d/ # wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
8、同步时间
# ntpdate 0.centos.pool.ntp.org # hwclock -w
9、配置文件打开数量
# echo * soft nofile 65536 >> /etc/securiry/limits.conf # echo * head nofile 65536 >> /etc/securiry/limits.conf
10、更新内核
# yum update -y
转载于:https://blog.51cto.com/guoxh/2069325