1. 关闭防火墙和selinux
      • systemctl stop firewalld.service
      • systemctl disable firewalld
      • setenforce 0
      • sed -i ‘s/enforcing/disabled/g’ /etc/selinux/config
      • grep SELINUX= /etc/selinux/config
    2. 配置国内yum源
      • cd /etc/yum.repos.d/
      • rm -rf *
      • curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
      • dnf clean all
      • dnf -y install epel-release vim wget lrzsz openssh-clients gcc gcc-c++ kernel-devel net-tools make wget
      • dnf -y update
    3. 关闭sshd解析
      • sed -i “s/#UseDNS yes/UseDNS no/g” /etc/ssh/sshd_config
      • grep UseDNS /etc/ssh/sshd_config
      • service sshd restart
    4. 美化vim
      • echo “set nu” >> ~/.vimrc
      • echo “set ts=4” >> ~/.vimrc
      • cat ~/.vimrc
    5. 配置时间同步
      • dnf -y install chrony
      • vim /etc/chrony.conf
      • image.png
      • systemctl start chronyd
      • systemctl enable chronyd
      • chronyc sourcestats -v