- 內核版本
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 |