centos6 与 7 其中的一些区别

# vi /etc/ssh/sshd_config

   #将MaxAuthTries注释去掉

   MaxAuthTries 5(登录次数)

UseDNS no   默认是yes 的,把这个改为no,可以大大减少认证的时间


centos7

yum装的服务器,或者自带的,启动命令有区别

现在是   systemctl   sshd.serviec start

centos6 是  service sshd  start


修改语系有区别

centos7:   vim   /etc/locale.conf

          LANG="en_US.UTF-8"

centos6 :   vim  /etc/sysconfig/i18n

          LANG="en_US.UTF-8"


cento7 开放防火墙端口

      firewall-cmd --zone=public --add-port=80/tcp --permanent

      --zone #作用域

      --add-port=80/tcp  #添加端口,格式为:端口/通讯协议

      --permanent  #永久生效,没有此参数重启后失效

      firewall-cmd --reload  重启防火墙生效

centos6 

      永久生效话直接修改/etc/sysconfig/iptables


修改名字

centos7 :   vim /etc/hostname

centos6:     vim /etc/sysconfig/network

暂时改名直接hostname + name


时间同步

centos7   自带chrony,可以设置时间,vim /etc/chrony.conf

centos6    vim  /etc/ntp.conf


你可能感兴趣的:(centos6 与 7 其中的一些区别)