组成对比
CentOS 6 | CentOS 7 | |
---|---|---|
文件系统 | EXT4 | XFS |
内核 | 2.6 | 3.10 |
默认数据库 | MySql | MariaDB |
本地化命令
CentOS 7 采用了较多ctl后缀命令:
- timedatectl 时区查看和调整
timedatectl set-timedate
- localectl 语系查看和调整
localectl set-localectl
- hostnamectl 主机名查看和调整
hostnamectl set-hostname
网络服务管理
操作行为 | CentOS 6.x | CentOS 7.x |
---|---|---|
启动指定服务 | service 服务名 start | systemctl start 服务名 |
关闭指定服务 | service 服务名 stop | systemctl stop 服务名 |
重启指定服务 | service 服务名 restart | systemctl restart 服务名 |
查看指定服务状态 | service 服务名 status | systemctl status 服务名 |
启动所有服务状态 | service --status-all | systemctl list-units |
设置服务自启动 | chkconfig 服务名 on | systemctl enable 服务名 |
设置服务不自启动 | chkconfig 服务名 off | systemctl disable 服务名 |
查看所有服务自启动状态 | chkconfig --list | systemctl list-unit-files |
网络设置
网络设置 | CenOS 6.x | CentOS 7.x |
---|---|---|
网卡名 | eth0 | ens33 |
网络配置命令 | ifconfig/setup | ip/nmtui |
网络服务 | network | NetworkManager(network备用) |