CentOS 7与CentOS 6的区别

本文对比了CentOS6与CentOS7在桌面系统、文件系统、内核版本、Python版本、防火墙、数据库、文件结构、主机名配置、时间同步、时间与地区设置、服务管理、网络配置、系统启动关闭操作等方面的显著不同。

CentOS 7与CentOS 6的区别【199cloud-艾娜】

(1)桌面系统

[CentOS 6] GNOME 2.x

[CentOS 7] GNOME 3.x(GNOME Shell)
(2)文件系统

[CentOS 6] ext4

[CentOS 7] xfs
(3)内核版本

[CentOS 6] 2.6.x-x

[CentOS 7] 3.10.x-x
(4)Python版本

[CentOS 6] 2.6

[CentOS 7] 2.7
(5)防火墙

[CentOS 6] iptables

[CentOS 7] firewalld
(6)默认数据库

[CentOS 6] MySQL

[CentOS 7] MariaDB
(7)文件结构

[CentOS 6] /bin, /sbin, /lib, and /lib64在/下

[CentOS 7] /bin, /sbin, /lib, and /lib64在/usr下
(8)主机名

[CentOS 6] /etc/sysconfig/network

[CentOS 7] /etc/hostname
(9)时间同步

[CentOS 6]

$ ntp

$ ntpq -p

[CentOS 7]

$ chrony

$ chronyc sources
(10)修改时间

[CentOS 6]

$ vim /etc/sysconfig/clock

ZONE=“Asia/Tokyo”

UTC=fales

$ sudo ln -s /usr/share/zoneinfo/Asia/Tokyo/etc/localtime

[CentOS 7]

$ timedatectl set-timezone Asia/Tokyo

$ timedatectl status
(11)修改地区

[CentOS 6]

$ vim /etc/sysconfig/i18n

LANG=“zh_CN.utf8”

$ /etc/sysconfig/i18n

$ locale

[CentOS 7]

$ localectl set-locale.utf8

$ localectl status

实际修改的是文件 /etc/locale.conf

修改 Secure CRT 的Terminal—>Appearance—>“Character encoding”为 UTF-8,控制台方能正常显示中文。
(12)服务相关
*启动停止

[CentOS 6]

$ service service_name start

$ service service_name stop

$ service sshd restart/status/reload

[CentOS 7]

$ systemctl start service_name

$ systemctl stop service_name

$ systemctl restart/status/reload sshd
*自启动

[CentOS 6]

$ chkconfig service_name on/off

[CentOS 7]

$ systemctl enable service_name

$ systemctl disable service_name
*服务一览

[CentOS 6]

$ chkconfig --list

[CentOS 7]

$ systemctl list-unit-files

$ systemctl --type service
*强制停止

[CentOS 6]

$ kill -9

[CentOS 7]

$ systemctl kill --signal=9 sshd
(13)网络
*网络信息

[CentOS 6]

$ netstat

$ netstat -I

$ netstat -n

[CentOS 7]

$ ip n

$ ip -s l

$ ss

  • IP地址MAC地址

[CentOS 6]

$ ifconfig -a

[CentOS 7]

$ ip address show
*路由

[CentOS 6]

$ route -n

$ route -A inet6 -n

[CentOS 7]

$ ip route show

$ ip -6 route show
(14)重启关闭
*关闭

[CentOS 6]

$ shutdown -h now

[CentOS 7]

$ poweroff

$ systemctl poweroff
*重启

[CentOS 6]

$ reboot

$ shutdown -r now

[CentOS 7]

$ reboot

$ systemctl reboot
*单用户模式

[CentOS 6]

$ init S

[CentOS 7]

$ systemctl rescue
*启动模式

[CentOS 6]

[GUICUI]

$ vim /etc/inittab

id:3:initdefault:

[CUIGUI]

$ startx

[CentOS 7]

[GUICUI]

$ systemctl isolate multi-user.target

[CUIGUI]

$systemctl isolate graphical.target

默认

$ systemctl set-default graphical.target

$ systemctl set-default multi-user.target

当前

$ systemctl get-default
(15) 网卡命名

[CentOS 6]

eth0

[CentOS 7]

成为了可预见性的命名规则

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值