centos6和centos7的主要差别

服务管理的差别

entos6 采用 servicechconfig管理服务
centos7 采用systemctl 管理服务,但是还可以使用service和chkconfig命令

以sshd命令为列

sysvinit命令systemd命令备注
service sshd start/stop/restart/statussystemctl start/stop/restart/status sshd服务的开始/停止/重启/状态
service sshd reloadsystemctl reload sshd重启读取配置文件(不停掉服务)
chkconfig sshd on/offsystemctl enable/disable sshd服务开机自启/不开机自启
chkconfig --listsystemtcl list-unit-files查看所有服务开机自启动或者禁止情况
chkconfig --list sshdsystemctl is-enabled sshd查看单个服务是否开机自启
chkconfig --add sshdsystemctl daemon-reload修改服务文件(不是配置文件)后,重新加载服务
kill -9 <PID>systemctl kill --signal=9 sshd强制停止

网络管理的差别

网卡名

         centos6     eth0

         centos7     网卡名,接口名称被自动基于固件

网络配置命令

        在CentOS 6中的ifconfig,在CentOS 7中被ip命令取代了(不过现在ifconfig和ip都可以使用);
        图形化网络配置工具inmtui取代了setup。

网络服务

       centos6使用/etc/init.d/network服务,centos7新增加了NetworkManager服务,network仍然作为备用使用

路由查看

      centos6      route -n

      centos7      ip route show

ip与mac地址

     centos6   ifconfig -a

     centos7   ip address show

默认文件系统

      centos6      ex4

      centos7      xfs

xfs是扩展性高、高性能的文件系统。可通过工具xfsdump和xfsrestore来备份和恢复xfs文件系统,
ext3 支持的最大 16TB 文件系统和最大 2TB 文件
ext4 分别支持1EB(1,048,576TB, 1EB=1024PB, 1PB=1024TB)的文件系统,以及 16TB (4K block size)的文件。ext3 目前只支持 32,000个子目录,而 ext4 支持无限数量的子目录。
xfs是一个64位文件系统,最大支持8EB减1字节的单个文件系统,实际部署时取决于宿主操作系统的最大块限制

文件结构变化

 centos6的/bin, /sbin, /lib, and /lib64在/
 centos7的/bin, /sbin, /lib, and /lib64移到/usr

默认数据库

  centos6   myql

  centos7   mariadb

防火墙差别

  centos6   iptables

  centos7   firewalld

 主机名

 centos6    /etc/sysconfig/network

 centos7    /etc/hostname

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值