In this example, the Gnome GUI is installed directly from the CD or ISO image file by modifying the repo file in CentOS 7 to avoid time-consuming downloading from the official website or image.
1. First make sure that the CD or ISO image file is properly connected to the client, and enter "Mkdir/cdrom" to create a new folder named "CDRom" in the root directory.
Continuing to enter "Mount/dev/cdrom/cdrom" to mount the CD or ISO image file to the root directory named "CDROM", it is recommended that you enter "Ls/cdrom" to see if it is mounted correctly.
2. Enter "Vi/etc/yum.repos.d/local.repo" to create a new file named "Local.repo" in the/ETC/YUM.REPOS.D directory.
3. Press "I" to enter the edit state, and enter the following, Gpgcheck is optional, if set to Gpgcheck=0 Gpgkey selection is automatically invalid, after the input is complete, press "ESC" and enter ": X" to save exit.
[Localrepo]
Name=local Repository
Baseurl=file:///cdrom
Enabled=1
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-7
4. Enter "cd/etc/yum.repos.d/" to enter the directory, continue to enter "LS" to view the file, use the MV command to change all the repo files except "Local.repo" to "file name. Repo.bak" (not recommended).
5. Enter "Yum clean all" for cleanup.
6. Enter "Yum install vsftpd" to try to install VSFTPD, enter Y to start the download when the following screen appears.
7. The system prompts to confirm the GPG signature authentication, enter y directly to complete the installation.
8. Enter "Yum Groupinstall" gnome Desktop "graphical administration Tools" and press ENTER to start installing the Gnome GUI.
9. Enter Y to begin downloading the file, note the download speed and time.
10. Wait a few minutes before you are prompted to complete the installation.
11. Enter "StartX" to start the graphical interface.
12. You have entered the Gnome graphical interface to start the configuration.
13. To boot the Gnome GUI directly, enter "Ln-sf/lib/systemd/system/runlevel5.target/etc/systemd/system/default.target" and press ENTER to confirm Then reboot.
Note: CentOS 7 is no longer configured with/etc/inittab.
How to install the CentOS 7 graphical interface (Gnome GUI) locally from CD