模版机优化:
1.修改yum源为阿里云
rm -f /etc/yum.repos.d/*.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
2.安装常用工具包
yum install net-tools vim tree htop iftop iotop lrzsz sl wget unzip telnet nmap nc psmisc dos2unix bash-completion sysstat rsync nfs-utils -y
3.关闭firewalld防火墙
systemctl disable firewalld
4.关闭selinux
sed -i '/^SELINUX=/c SELINUX=disabled' /etc/selinux/config
5.关闭networkmanager
6.更改主机名
hostnamectl set-hostname
7.小功能优化-优化系统提示符
echo "PS1='\[\e[32;1m\][\u@\h \W]\\$ \[\e[0m\]'" >>/etc/profile
source /etc/profile