zoukankan      html  css  js  c++  java
  • CentOS7和CentOS6的区别

    1.文件系统

    centos6--ext4

    centos7--xfs

    说明:fdisk等磁盘操作命令使用都一样,只是格式化磁盘时使用mkfs.xfs而不要用mkfs.ext4,ext4的文件系统在centos7上只能读不能写。

    2.修改主机名

    centos6--/etc/sysconfig/network修改HOSTNAME的值

    centos7--/etc/hostname直接输入主机名

    说明:centos7上一样可以使用hostname临时改主机名,而且不用和CentOS6 一样重启重新登录后shell中主机名即会改变。

    3.启停服务

    centos6--service service_name start/stop/status

    centos7--systemctl start/stop/status service_name

    4.查看服务是否开机自启动

    centos6--chkconfig --list service_name

    centos7--systemctl list-unit-files service_name

    说明:centos7很多服务要加.service后辍,简单起见可直接用systemctl list-unit-files | grep service_name

    5.配置服务开机自启动

    centos6--chkconfig service level on/off

    centos7--systemctl enable/disable service_name

    6.启动级别

    centos6--编缉/etc/inittab;格式如:id:5:initdefault:

    centos7--systemctl set-default multi-user.target/graphical.target

    说明: multi-user.target同centos6的3级别,graphical.target相当于centos6的5级别;获取当前启动级别:runlevel。

    7.防火墙

    centos6--iptables

    centos7--firewall

    说明:感觉最新的centos7中iptables也可以使用,但像是一个外壳,规则会自动转成firewall的规则;iptables中最常用的iptables -I INPUT对应firewall的rich rule,形如:

              firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="192.168.220.0/24" port protocol="tcp" port="8080" accept"

    8.网卡名

    centos6--eth0

    centos7--ens33

    说明:感觉centos7中ifconfig ens33 down不能完全停用网卡,需要ifdown才能彻底。

    9.内核

    centos6--2.6.x

    centos7--3.10.x

    参考:

    https://www.cnblogs.com/bethal/p/5945026.html

    http://blog.csdn.net/smstong/article/details/39317277

  • 相关阅读:
    HDU 3605 Escape
    ZOJ 2587 Unique Attack
    POJ 3686 The Windy's
    POJ 3084 Panic Room
    SGU 206 Roads
    POJ 3189 Steady Cow Assignment
    POJ 2125 Destroying The Graph
    PLS_INTEGER类型与timestamp类型、date、及时间函数
    SDO_Geometry说明
    with与树查询的使用
  • 原文地址:https://www.cnblogs.com/lsdb/p/7809442.html
Copyright © 2011-2022 走看看