RHEL7 does not have a graphical interface. Install the graphical interface

Keywords: yum Red Hat Web Server Unix

Background:

When a RHEL7 machine is newly built, there is no graphic interface????

reason:

  • The system was created without graphing installed
  • The default run level of the system is not graphical
  • After the system is installed, there are operations to reduce the memory. If the memory is too low, the desktop cannot be started, and so on

    The following highlights that when you create a system, there is no graphical installation. How to install graphical methods separately.
    Generally speaking, when we install the system, we will have a graphical interface for us to choose from. Select "Server with GUI" and the default is "Minimal Install". If this button is not selected accidentally, there will be no graphical interface when we start the machine.

    Manual installation of graphical interface

  • Mount the OS resource first

  • If you configure the yum source again, you can view the existing blog and how to configure the yum source( http://blog.csdn.net/zengzisuzi/article/details/78134455)
[root@ClusterRhel7n1zs ~]# cd /mnt
[root@ClusterRhel7n1zs mnt]# yum group list
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use su                                                                                                 bscription-manager to register.
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
zs                                                       | 4.1 kB     00:00
(1/2): zs/group_gz                                         | 134 kB   00:00
(2/2): zs/primary_db                                       | 3.4 MB   00:05
Available environment groups:
   Minimal Install
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done

Start installation of graphical interface

[root@ClusterRhel7n1zs mnt]#yum -y groupinstall "Server with GUI"
...
Complete!

View installed details

[root@ClusterRhel7n1zs mnt]# show-installed
WARNING: The following groups contain packages not found in the repositories:
XXX base
        yum-plugin-security
XXX core
        ql2100-firmware
        ql23xx-firmware
        ql2200-firmware
        bfa-firmware
XXX gnome-desktop
        unoconv
        polkit-gnome
        gvfs-obexftp

@base
        -yum-plugin-security
@compat-libraries
@core
        -bfa-firmware
        -ql2100-firmware
        -ql2200-firmware
        -ql23xx-firmware
@development
@dial-up
@fonts
@gnome-desktop
        -gvfs-obexftp
        -polkit-gnome
        -unoconv
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@multimedia
@print-client
@x11
# Others
Red_Hat_Enterprise_Linux-Release_Notes-7-ja-JP
grub2
man-pages-ja
# 1255 package names, 246 leaves
# 14 groups, 3 leftovers, 8 excludes
# 29 lines

You can then use the command to switch to the GUI

[root@ClusterRhel7n1zs mnt]# startx

Set the graphical interface as the default startup interface

[root@ClusterRhel7n1zs mnt]#systemctl get-default
multi-user.target  
[root@ClusterRhel7n1zs mnt]#cat /etc/inittab  
[root@ClusterRhel7n1zs mnt]#systemctl set-default graphical.target
rm '/etc/systemd/system/default.target'  
ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target' 
[root@ClusterRhel7n1zs mnt]#systemctl get-default 
graphical.target 
[root@ClusterRhel7n1zs mnt]#reboot

Posted by spicerje on Thu, 30 Apr 2020 18:41:29 -0700