RHEL6和RHEL7的变化

来源:互联网 发布:vb.net和asp.net区别 编辑:程序博客网 时间:2024/04/29 13:18

Administrative command and config-file changes

System Basics

TaskRHEL6RHEL7View RH subscription information/etc/sysconfig/rhn/systemid 
subscription-manager identitysubscription-manager identityConfigure RH subscriptionrhn_register 
rhnreg_ks 
subscription-managersubscription-manager14 
rhn_register15

Basic Configuration

TaskRHEL6RHEL7Graphical configuration toolssystem-config-*gnome-control-centerConfigure networksystem-config-networknmcli 
nmtui 
nm-connection-editorConfigure system languagesystem-config-languagelocalectlConfigure system time and datesystem-config-date 
datetimedatectl 
dateSynchronize time and datentpdate 
/etc/ntp.confntpdate 
/etc/chrony.confConfigure keyboardsystem-config-keyboardlocalectl

Jobs and services

TaskRHEL6RHEL7List all serviceschkconfig 
ls /etc/init.d/systemctl -at service 
ls /{usr/lib,etc}/systemd/system/*.serviceList running servicesservice –status-allsystemctl -t service –state=activeStart/stop a serviceservice name start 
service name stopsystemctl start name.service 
systemctl stop name.serviceEnable/disable a servicechkconfig name on 
chkconfig name offsystemctl enable name.service 
systemctl disable name.serviceCheck if service enabledchkconfig namesystemctl is-enabled nameView service statusservice name statussystemctl status name.serviceCreate service file or change configchkconfig –addsystemctl daemon-reloadView runlevel/targetrunlevelsystemctl get-defaultChange runlevel/targetinit runlevelsystemctl isolate name.target 
init runlevelConfigure logging/etc/rsyslog.conf/etc/rsyslog.conf 
/etc/rsyslog.d/*.conf 
/var/log/journal/ 
/etc/systemd/journald.confView logs/var/log//var/log/ 
journalctl

Kernel, boot, and hardware

TaskRHEL6RHEL7Bypass root password prompt at bootappend 1 or s or init=/bin/bash to kernel cmdlineappend rd.break or init=/bin/bash to kernel cmdlineShut down systemshutdownsystemctl shutdownPower off systempoweroffsystemctl poweroffHalt systemhaltsystemctl haltReboot systemrebootsystemctl rebootConfigure default runlevel/target/etc/inittabsystemctl set-defaultConfigure GRUB bootloader/boot/grub/grub.conf/etc/default/grub 
grub2-mkconfig 
grub-set-default

Software management

TaskRHEL6RHEL7Install softwareyum install 
yum groupinstallyum install 
yum group installView software infoyum info 
yum groupinfoyum info 
yum group info

File systems, volumes, and disks

TaskRHEL6RHEL7Create/modify disk partitionsfdisk 
partedfdisk 
parted 
gdiskDefault file systemext4xfsEnlarge volumes formatted with default filesystemvgextend 
lvextend 
resize2fsvgextend 
lvextend 
xfs_growfs

Networking

TaskRHEL6RHEL7Configure name resolution/etc/hosts 
/etc/resolv.conf/etc/hosts 
/etc/resolv.conf 
nmcli con modConfigure hostname/etc/sysconfig/network/etc/hostname 
hostnamectl 
nmtuiView network interface infoip addr 
ifconfig 
brctlip addr 
nmcli dev show 
teamdctl 
brctl 
bridgeConfigure network interface/etc/sysconfig/network-scripts/ifcfg-*/etc/sysconfig/network-scripts/ifcfg-* 
nmcli con [add|mod|edit] 
nmtui 
nm-connection-editorConfigure firewalliptables & ip6tables 
/etc/sysconfig/ip*tables 
system-config-firewallfirewall-cmd 
firewall-configView ports/socketsnetstat 
ss 
lsofss 
lsof

 

0 0