自由學習的風

幽夢影 張潮 少年讀書,如隙中窺月;中年讀書,如庭中望月;老年讀書,如臺上玩月。皆以閱歷之淺深,為所得之淺深耳。

[Linux] RHEL 6 vs. 7

2018年1月9日 星期二

新的學校首頁系統即將更換,Linux 系統會提供 CentOS的虛擬機;先來熟悉一下 Redhat 系的操作。
看起來 RHEL 6 比較接近 Ubuntu 14.04,RHEL 7則接近 Ubuntu 16.04,

Ref:

  1. https://arkit.co.in/rhel-6-vs-rhel-7-difference-previous-newer-version/
  2. http://simplylinuxfaq.blogspot.tw/p/major-difference-between-rhel-7-and-6.html
Feature NameRHEL 6RHEL 7
Default File SystemExt4XFS
Kernel Version2.6.xx3.10.xx
Release NameSantiagoMaipo
Gnome VersionGNOME 2GNOME 3.8
KDE VersionKDE 4.1KDE 4.6
Release DateWednesday, November 10, 2010Tuesday, June 10, 2014
NFS VersionNFS 4NFS 4.1. NFS V2 is deprecated in RHEL 7
Samba VersionSMB 3.6SMB 4.4
Default DatabaseMySQLMariaDB
Cluster Resource ManagerRgmanagerPacemaker
Network InterfaceGroupingBonding can be done as Active-Backup, XOR, IEEE and Load Balancing Team Driver will support multiple types of Teaming methods called Active-Backup, Load-balancing and Broadcast
KDUMPKdump does't support with large RAM Size RHEL 7 can be supported up to 3TB
Boot LoaderGrub 2
/boot/grub2/grub.cfg
Grub 0.97
/boot/grub/grub.conf
File System Checke2fsck
-Inode check. Block and size check
–Directory Structure check
-Directory Link Check
-reference count check
-Group Summary Check 
 xfs_replair
– Inode blockmap checks
-Inode allocation map checks
-Inode size check
-Directory check
-Path Name check
-Link count check
-Freemap check
-Super block check
Process IDInitd  Process ID 1 Systemd Process ID 1
Port SecurityIptables by default service port is enabled when service is switched on. Firewalld instead of iptables. Iptables can also support with RHEL 7, but we can't use both of them at the same time. Firewall will not allow any port until and unless you enabled it.
Boot Time40 Sec20 Sec
File System SizeEXT4 16TB with XFS 100TBXFS 500TB with EXT4 16TB
Processor Architecture32Bit and 64BitOnly 64Bit.
Network Configuration Toolsetupnmtui
Host name Config File/etc/sysconfig/network/etc/hostname No need to edit hostname file to write permanent hostname simply use hostnamectl command
Interface Nameeth0ens33xxx
Managing Servicesservice sshd start
service sshd restart
chkconfig sshd on
systemctl start sshd.service
systemctl restart sshd.service
systemctl enable sshd.service
System Logs/var/log//var/log
journalctl
Run Levelsrunlevel 0 – Power Off
runlevel 1 – Single User Mode
runlevel 2 – Multi User without Networking
runlevel 3 – Multi User CLI
runlevel 4 – Not USed
runlevel 5 – GUI Mode
runlevel 6 – Restart
There is no run levels in RHEL 7. Run levels are called as targets
Poweroff.target
rescue.target
multi-user.target
graphical.target
reboot.target
UID InformationNormal User UID will start from 500 to 65534
System Users UID will start from 1 to 499
Normal User UID start from 1000 – 65534
System Users UID will start from 1 to 999Because Services are increased compare to RHEL 6
By Pass Root Password Promptappend 1 or s or init=/bin/bash to Kernel command lineAppend rd.break or init=/bin/bash to kernel command line
Rebooting and Poweroffpoweroff – init 0
reboot – init 6
systemctl poweroff
systemctl reboot
YUM Commandsyum groupinstall
yum groupinfo
yum group install
yum group info

FeaturesRHEL 7RHEL 6
Default File SystemXFSEXT4
Kernel Version3.10.x-x kernel2.6.x-x Kernel
Kernel Code NameMaipoSantiago
General Availability Date of First Major Release2014-06-09 (Kernel Version 3.10.0-123)2010-11-09 (Kernel Version 2.6.32-71)
First Processsystemd (process ID 1)init (process ID 1)
Runlevelrunlevels are called as "targets" as shown below:

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 (this by default is linked to the multi-user target)
Traditional runlevels defined :

runlevel 0
runlevel 1
runlevel 2
runlevel 3
runlevel 4
runlevel 5
runlevel 6

and the default runlevel would be defined in "/etc/inittab" file.
Host Name Change
In Red Hat Enterprise Linux 7, as part of the move to the new init system (systemd), the hostname variable is defined in "/etc/hostname" file.
In Red Hat Enterprise Linux 6, the hostname variable was defined in the "/etc/sysconfig/network" configuration file.
Change In UID AllocationBy default a new user created would get UIDs assigned starting from 1000.

This could be changed in "/etc/login.defs" file if required.
Default UID assigned to users would start from 500.


This could be changed in "/etc/login.defs" file if required.
Max Supported File Size
Maximum (individual) file size = 500TB
Maximum filesystem size = 500TB

(This maximum file size is only on 64-bit machines. Red Hat Enterprise Linux does not support XFS on 32-bit machines.)
Maximum (individual) file size = 16TB
Maximum filesystem size = 16TB

(This maximum file size is based on a 64-bit machine. On a 32-bit machine, the maximum files size is 8TB.)
File System Check
"xfs_repair"

XFS does not run a file system check at boot time.
"e2fsck"

File system check would gets executed at boot time.
Differences Between xfs_repair & e2fsck
"xfs_repair"

- Inode and inode blockmap (addressing) checks.
- Inode allocation map checks.
- Inode size checks.
- Directory checks.
- Pathname checks.
- Link count checks.
- Freemap checks.
- Super block checks.

"e2fsck"

- Inode, block, and size checks.

- Directory structure checks.

- Directory connectivity checks.

- Reference count checks.

- Group summary info checks.
Difference Between xfs_growfs & resize2fs"xfs_growfs"

xfs_growfs takes mount point as arguments.
"resize2fs"

resize2fs takes logical volume name as arguments.
Change In File System Structure/bin, /sbin, /lib, and /lib64 are now nested under /usr./bin, /sbin, /lib, and /lib64 are usually under /
Boot Loader
GRUB 2
Supports GPT, additional firmware types, including BIOS, EFI and OpenFirmware. Ability to boot on various file systems (xfs, ext4, ntfs, hfs+, raid, etc)
GRUB 0.97
KDUMPRHEL7 supports kdump on large memory based systems up to 3 TBKdump doesn't work properly with large RAM based systems.
System & Service Manager"Systemd"

systemd is a system and service manager for Linux, and replaces SysV and Upstart used in previous releases of Red Hat Enterprise Linux. systemd is compatible with SysV and Linux Standard Base init scripts.
Upstart
Enable/Start ServiceFor RHEL 7, the systemctl command replaces service and chkconfig.

- Start Service : "systemctl start nfs-server.service".

- Enable Service : To enable the service (example: nfs service ) to start automatically on boot : "systemctl enable nfs-server.service".

Although one can still use the service and chkconfig commands to start/stop and enable/disable services, respectively, they
are not 100% compatible with the RHEL 7 systemctl command 
Using "service" command and "chkconfig" commands.

- Start Service : "service start nfs" OR "/etc/init.d/nfs start"

- Enable Service : To start with specific runlevel : "chkconfig --level 3 5 nfs on"
Default Firewall
"Firewalld (Dynamic Firewall)"

The built-in configuration is located under the "/usr/lib/firewalld" directory. The configuration that you can customize is under the "/etc/firewalld" directory. It is not possible to use Firewalld and Iptables at the same time. But it is still possible to disable Firewalld and use Iptables as before.
Iptables
Network Bonding"Team Driver"

-/etc/sysconfig/network-scripts/ifcfg-team0
- DEVICE=」team0」
- DEVICETYPE=」Team」
"Bonding"

-/etc/sysconfig/network-scripts/ifcfg-bond0
- DEVICE=」bond0」
Network Time SynchronizationUsing Chrony suite (faster time sync compared with ntpd)Using ntpd
NFSNFS4.1
NFSv2 is no longer supported. Red Hat Enterprise Linux 7 supports NFSv3, NFSv4.0, and NVSv4.1 clients.
NFS4
Cluster Resource ManagerPacemakerRgmanager
Load Balancer TechnologyKeepalived and HAProxyPiranha
Desktop/GUI InterfaceGNOME3 and KDE 4.10GNOME2
Default DatabaseMariaDB is the default implementation of MySQL in Red Hat Enterprise Linux 7MySQL
Managing Temporary FilesRHEL 7 uses systemd-tmpfiles (more structured, and configurable, method to manage tmp files and directories).Using "tmpwatch"

1 意見:

SimplyLinuxFAQ 提到...

Hi,

The reference link to my site got changed:
https://www.simplylinuxfaq.com/p/major-difference-between-rhel-7-and-6.html

張貼留言