|
CentOS 6.X |
CentOS 7.X |
防火墙 |
iptables |
firewalld(也能支持iptables) |
内核版本 |
2.6.x-x |
3.10.x-x |
默认数据库 |
MySQL |
MariaDB |
文件系统 |
EXT4 |
XFS |
时间同步 |
ntpq -p |
chronyc sources |
修改时区 |
/etc/sysconfig/clock |
timedatectl set-timezone Asia/Shanghai |
修改语言 |
/etc/sysconfig/il8n |
localectl set-locale LANG=zh_CN.UTF-8 |
主机名 |
配置文件(永久配置): /etc/sysconfig/network |
配置文件(永久配置): /etc/hostname 命令配置(永久配置): hostnamectl set-hostname 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 |
网络设置 |
CentOS 6.X |
CentOS 7.X |
网卡名 |
eth0 |
ens33 |
网络配置命令 |
ifconfig/setup |
ip/nmtui |
网络服务 |
默认使用network服务 |
默认使用NetworkManager服务(network备用) |
原文:https://www.cnblogs.com/wanao/p/13030889.html