Centos7脚本一键优化
我把优化centos7的脚本分享给大家,建议刚安装完服务器的朋友执行如下优化脚本 [root@test2 yum.repos.d]# cat centos7.sh #!/bin/bash #author junxi by #this script is only for CentOS 7.x #check the OS platform =`uname -i` if [ $platform != "x86_64" ];then echo "this script is only for 64bit Operating System !" exit 1 fi echo "the platform is ok" cat << EOF +---------------------------------------+ | your system is CentOS 7 x86_64 | | start optimizing....... | +---------------------------------------+ EOF #添加公网DNS地址 cat >> /etc/resolv.conf << EOF nameserver 223.6.6.6 EOF #Yum源更换为国内阿里源 yum install wget -y mv /etc/yum.repos.d/CentOS