您的位置:首页 > 其它

RHEL 6 和 RHEL 7 之间的变化(部分内容)

2015-08-06 16:37 330 查看


Administrative command and config-file changes
System Basics
TaskRHEL6RHEL7
View RH subscription information/etc/sysconfig/rhn/systemid
subscription-manager identity
subscription-manager identity
Configure RH subscriptionrhn_register
rhnreg_ks
subscription-manager
subscription-manager14
rhn_register15
Basic Configuration
TaskRHEL6RHEL7
Graphical configuration toolssystem-config-*gnome-control-center
Configure networksystem-config-networknmcli
nmtui
nm-connection-editor
Configure system languagesystem-config-languagelocalectl
Configure system time and datesystem-config-date timedatectl
datedate
Synchronize time and datentpdate ntpdate
/etc/ntp.conf/etc/chrony.conf
Configure keyboardsystem-config-keyboardlocalectl
Jobs and services
TaskRHEL6RHEL7
List all serviceschkconfig systemctl -at service
ls /etc/init.d/ls /{usr/lib,etc}/systemd/system/*.service
List running servicesservice –status-allsystemctl -t service –state=active
Start/stop a serviceservice name start systemctl start name.service
service name stopsystemctl stop name.service
Enable/disable a servicechkconfig name on systemctl enable name.service
chkconfig name offsystemctl disable name.service
Check if service enabledchkconfig namesystemctl is-enabled name
View service statusservice name statussystemctl status name.service
Create service file or change configchkconfig –addsystemctl daemon-reload
View runlevel/targetrunlevelsystemctl get-default
Change runlevel/targetinit runlevelsystemctl isolate name.target
init runlevel
Configure logging/etc/rsyslog.conf/etc/rsyslog.conf
/etc/rsyslog.d/*.conf
/var/log/journal/
/etc/systemd/journald.conf
View logs/var/log//var/log/
journalctl
Kernel, boot, and hardware
TaskRHEL6RHEL7
Bypass root password prompt at bootappend 1 or s or init=/bin/bash to kernel cmdlineappend rd.break or init=/bin/bash to kernel cmdline
Shut down systemshutdownsystemctl shutdown
Power off systempoweroffsystemctl poweroff
Halt systemhaltsystemctl halt
Reboot systemrebootsystemctl reboot
Configure default runlevel/target/etc/inittabsystemctl set-default
Configure GRUB bootloader/boot/grub/grub.conf/etc/default/grub
grub2-mkconfig
grub-set-default
Software management
TaskRHEL6RHEL7
Install softwareyum install yum install
yum groupinstallyum group install
View software infoyum info yum info
yum groupinfoyum group info
File systems, volumes, and disks
TaskRHEL6RHEL7
Create/modify disk partitionsfdisk
parted
fdisk
parted
gdisk
Default file systemext4xfs
Enlarge volumes formatted with default filesystemvgextend vgextend
lvextend lvextend
resize2fsxfs_growfs
Networking
TaskRHEL6RHEL7
Configure name resolution/etc/hosts
/etc/resolv.conf
/etc/hosts
/etc/resolv.conf
nmcli con mod
Configure hostname/etc/sysconfig/network/etc/hostname
hostnamectl
nmtui
View network interface infoip addr
ifconfig
brctl
ip addr
nmcli dev show
teamdctl
brctl
bridge
Configure network interface/etc/sysconfig/network-scripts/ifcfg-*/etc/sysconfig/network-scripts/ifcfg-*
nmcli con [add|mod|edit]
nmtui
nm-connection-editor
Configure firewalliptables & ip6tables
/etc/sysconfig/ip*tables
system-config-firewall
firewall-cmd
firewall-config
View ports/socketsnetstat
ss
lsof
ss
lsof
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: