The differences are as follows:
1. System initialization technology evolution-boot startup process
CentOS 6: Using INIT technology, the entire boot process is Self-check BIOS - MBR boot - GRUB loading - load kernel - start INIT process - read INITTAB configuration file, and start process services in order according to the mode specified in the configuration file. INIT technology makes the startup process very clear and relies on SHELL scripts. Because the processes are started one by one in sequence, the speed is slow and the system startup may be affected because a certain service is stuck.
CentOS 7: Using systemd technology. This is a new technology that replaces INIT. It uses a parallel method to start the process, so the startup speed is faster, and it is compatible with INIT commands to reduce migration costs.
2. Changes in network setting methods
The familiar ipconfig in CentOS 6 was replaced by the ip command in CentOS 7; the graphical network configuration tool nmtui replaced setup.
(Recommended tutorial: centos tutorial)
3. Host name and character set
You can modify the host name in CentOS 6 By editing the /etc/sysconfig/network file, but this method has been abandoned in CentOS 7 and the /etc/hostname file is used. The method of temporarily modifying the host name remains unchanged, and the hostname command is still used. And a new hostname management tool hostnamectl has been added to CentOS 7 (the file name modifications made by this tool are permanent).
For the modification of the character set, CentOS 7 uses the new configuration file /etc/locale.conf to replace /etc/sysconfig/i18n. If you want to temporarily modify the character set, the method remains the same, modify the LANG variable, such as LANG=zh_CN.UTF-8. A new character set management tool, localectl, has the same effect as hostnamectl.
4. Compatible with /etc/rc.local
The /etc/rc.local file records commands that need to be automatically executed after booting. Although this file has been abandoned in CentOS 7, However, it can also be used with compatibility. You only need to give the file executable permissions:
chmod +x /etc/rc.d/rc.local
5. The difference between runlevels
The /etc/inittab file in CentOS 6 is based on init technology. , so naturally it cannot be used in CentOS 7, but the file is still retained, but the content has been replaced with boot content to let users know how to switch run levels now. Since this is not commonly used, I will not continue to describe it.
6. Service Management
This is the most unpleasant modification for users. It adds the systemctl tool and integrates the functions of the service and chkconfig commands.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of What are the differences between centos6 and centos7?. For more information, please follow other related articles on the PHP Chinese website!