淺談RHEL7和RHEL6的主要變化
阿新 • • 發佈:2018-04-07
linux淺談RHEL7和RHEL6的主要變化
RHEL7 RHEL6 文件系統 XFS EXT4 內核版本 3.10.x-x系列 2.6.x-x系列 內核名稱 Maipo Santiago 發布時間 2014-06-09(3.10.0-123) 2010-11-09(2.6.32-71) 進程名稱 systemd init 運行級別 runlevel0.target->poweroff.target
runlevel1.target->rescue.target
runlevel2.target->multi-user.target
runlevel3.target->multi-user.target
runlevel4.target->multi-user.target
runlevel5.target->graphical.target
runlevel6.target->reboot.target
/etc/systemd/system/default.target runlevel0
runlevel1
runlevel2
runlevel3
runlevel4
runlevel5
runlevel6
/etc/inittab 主機名稱 /etc/hostname /etc/sysconfig/network 最大文件 500TB 16TB 檢查工具 xfs.repair e2fsck 啟動工具 GRUB2 GRUB0.97 服務啟動 Systemd Upstart 服務管理 systemctl enable xxx.service
systemctl start xxx.service
systemctl stop xxx.service
systemctl restart xxx.service
兼容chkconfig,service命令 service enable xxx.service
service stop xxx.service
service start 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的管理命令和配置文件的變化 訂閱信息 RHEL7 RHEL6
訂閱信息工具 subscription-manager identity /etc/sysconfig/rhn/systemid
subscription-manager identity 配置訂閱信息 subscription-manager rhn_register rhn_register rhnreg_ks subscription-manager identity 基本配置 RHEL7 RHEL6 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 服務管理 RHEL7 RHEL6 服務列表 systemctl -at service
ls /{usr/lib,etc}/systemd/system/*.service chkconfig
ls /etc/init.d/ 服務啟動 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 init runlevel 日誌文件 /etc/rsyslog.conf
/etc/rsyslog.d/*.conf
/var/log/journal/
/etc/systemd/journald.conf /etc/rsyslog.conf 查看日誌文件 /var/log/ /var/log/journalctl 內核硬件 RHEL7 RHEL6 啟動提示符 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
grub2-mkconfig
grub-set-default /boot/grub/grub.conf 軟件管理 RHEL7 RHEL6 安裝軟件包 yum install
yum group install yum install
yum groupinstall 查看軟件包 yum info
yum group info yum info
yum groupinfo 文件系統 RHEL7 RHEL6 建立文件系統 fdisk parted gdisk fdisk parted LVM管理 vgextend lvextend xfs_growfs vgextend lvextend resize2fs 網絡接口配置 RHEL7 RHEL6 配置名稱 /etc/hosts
/etc/resolv.conf
nmcli conmod /etc/hosts
/etc/resolv.conf 主機名稱配置 /etc/hostname
hostnamectl
nmcli /etc/sysconfig/network Ip地址配置 ip addr
nmcli dev
show
teamdctl
brctl
bridge ip add
ifconfig
brctl 配置防火墻 firewall-cmd
firewall-config iptables&ip6tables
/etc/sysconfig/ip*tables
system-config-firewall 查看端口命令 ss
lsof netstat
ss
lsof
runlevel1.target->rescue.target
runlevel2.target->multi-user.target
runlevel3.target->multi-user.target
runlevel4.target->multi-user.target
runlevel6.target->reboot.target
/etc/systemd/system/default.target
runlevel1
runlevel2
runlevel3
runlevel4
runlevel5
runlevel6
/etc/inittab
systemctl start xxx.service
systemctl stop xxx.service
systemctl restart xxx.service
兼容chkconfig,service命令
service stop xxx.service
service start xxx.service
chkconfig --level 3 5 nfs on
subscription-manager identity
ls /{usr/lib,etc}/systemd/system/*.service
ls /etc/init.d/
init runlevel
/etc/rsyslog.d/*.conf
/var/log/journal/
/etc/systemd/journald.conf
grub2-mkconfig
grub-set-default
yum group install
yum groupinstall
yum group info
yum groupinfo
/etc/resolv.conf
nmcli conmod
/etc/resolv.conf
hostnamectl
nmcli
nmcli dev
show
teamdctl
brctl
bridge
ifconfig
brctl
firewall-config
/etc/sysconfig/ip*tables
system-config-firewall
lsof
ss
lsof
淺談RHEL7和RHEL6的主要變化