- 内核版本
Rhel6.8的内核版本为2.6.32-642,rhel7使用的是3.10.x-x系列,最新的rhel7.3使用的是3.10.0-514。
- 文件系统的差别
Rhel7默认使用xfs文件系统,rhel6默认为ext4文件系统,但从rhel6.8起开始支持xfs系统。
- 设置默认启动级别
Rhel6:vim /etc/inittab 将末行的id:3:initdefault中的3改为相应数字即可
Rhel7:rhel7采用了targets来定义运行级别,设置默认启动级别命令为systemctl set-default x.target ,重启后即可生效
- 设置开机启动项
Rhel6:chkconfig –level x service_name on/off
Rhel7:systemctl enable/disable service_name
- 启动工具
Rhel6:grub
Rhel7:grub2
- 系统修复工具
Rhel6: e2fsck –a|-b|-B|-c|-C|-d|-f|-F|-l|-L|-n|-p|-v|-V|-y
Rhel7: xfs_repair –f|-n|-m|-L|-d|-c等,使用xfs_repair检测修复文件系统时,相应文件系统必须先被卸载
- 修改主机名
Rhel6: 临时 hostname 永久 vim /etc/sysconfig/network
Rhel7: 临时 hostname 永久 vim /etc/hostname
- 网络设置
Rhel6:vim /etc/sysconfig/network-scripts/ifcfg-eth0 或setup
Rhel7:vim /etc/sysconfig/network-scripts/ifcfg/eno16777736 或者 nmtui(需先启动NetworkManager服务)
- Ip设置
Rhel6: ip addr | ifconfig | brctl | vim /etc/sysconfig/network-scripts/ifcfg-eth0
Rhel7: ip addr | ifconfig | brctl | nmtui | vim /etc/sysconfig/network-scripts/ifcfg/eno16777736
- 防火墙设置
Rhel6: iptables -[AD] chain rule-specification [options]
Rhel7: 默认为firewalld,同时兼容iptables。firewall -cmd
- 网络绑定
Rhel6多网卡绑定:nmcli命令或配置ifcfg-bond0
Rhel7多网卡绑定:nmcli命令或配置ifcfg-team0
- 网络时间设定
Rhel6: vim /etc/ntp.conf service ntpd reload
Rhel7:vim /etc/ntp.conf systemctl restart|start ntpd
- 时间配置工具
Rhel6: system-config-date,图形化配置工具
Rhel7: timdatectl
- 查看端口
Rhel6: ss | lsof –i |netstat
Rhel7: ss | lsof -i
| RHEL7 | RHEL6.8 |
文件系统 | XFS | 支持Xfs |
内核版本 | 3.10.x-x系列 | 2.6.x-x系列 |
内核名称 | Maipo | Santiago |
进程名称 | systemd | init |
运行级别 | runlevel0.target->poweroff.target | runlevel0 |
主机名称 | /etc/hostname | /etc/sysconfig/network |
检查工具 | xfs.repair | e2fsck |
启动工具 | GRUB2 | GRUB0.97 |
服务管理 | systemctl enable xxx.service | chkconfig --level 3 5 nfs on |
防火墙 | Firewalld兼容Iptables | Iptables |
网络绑定 | Team Driver | Bonding |
网络时间 | Chrony,ntpd | ntpd |
NFS版本 | NFS4.1 支持NFSv3,NFSv4.0,NFSv4.1客户端 | NFS4 |
集群管理工具 | Pacemaker | Rgmanager |
负载均衡工具 | Keepalived,HAProxy | Rgmanager |
桌面环境 | GNOME3,KDE4.10 | GNOME2 |
数据库 | MariaDB | MySQL |
RHEL7和RHEL6的管理命令和配置文件的变化 | ||
订阅信息工具 | subscription-manager identity | /etc/sysconfig/rhn/systemid |
配置订阅信息 | subscription-manager rhn_register | rhn_register rhnreg_ks subscription-manager identity |
GUI配置工具 | gnome-control-center | system-config-* |
网络配置工具 | nmcli nmtui nm-connection-editor | system-config-network |
语言配置工具 | localectl | system-config-language |
时间配置工具 | timedatectl date | system-config-date date |
时间同步 | ntpdate /etc/chrony.conf | ntpdate /etc/ntp.conf |
键盘配置 | localectl | system-config-keyboard |
服务列表 | systemctl -at service | chkconfig |
服务启动 | systemctl start name.service | service name start |
服务停止 | systemctl stop name.service | service name stop |
服务查看 | systemctl status name.service | service name status |
服务重启 | systemctl restart name.service | service name restart |
服务开机自启 | systemctl enable name.service | chkconfig name on |
服务开机不自启 | systemctl disable name.service | chkconfig name off |
添加服务 | systemctl daemon-reload | achkconfig --add |
服务列表查看 | systemctl -t service --state=active | service --status-all |
查看运行级别 | systemctl get-default | runlevel |
修改运行级别 | systemctl isolate name.target | init runlevel |
日志文件 | /etc/rsyslog.conf | /etc/rsyslog.conf |
查看日志文件 | /var/log/ | /var/log/journalctl |
启动提示符 | append rd.break or init=/bin/bash to kernel cmdline | append 1 or s or init=/bin/bash to kernel cmdline |
关闭系统 | systemctl shutdown | shutdown |
关闭电源 | systemctl poweroff | poweroff |
挂起系统 | systemctl halt | halt |
重启系统 | systemctl reboot | reboot |
修改运行级别 | systemctl set-default | /etc/inittab |
配置GRUB | /etc/default/grub | /boot/grub/grub.conf |
安装软件包 | yum install | yum install |
查看软件包 | yum info | yum info |
建立文件系统 | fdisk parted gdisk | fdisk parted |
LVM管理 | vgextend lvextend xfs_growfs | vgextend lvextend resize2fs |
配置名称 | /etc/hosts | /etc/hosts |
主机名称配置 | /etc/hostname | /etc/sysconfig/network |
Ip地址配置 | ip addr | ip addr |
配置防火墙 | firewall-cmd | iptables&ip6tables |
查看端口命令 | ss | netstat |