Yum installs the GNOME desktop environment on Centos_linux Centos 6/7
CentOS is a common operating system for servers, but it is rarely used as a desktop environment because of the need for stability and no very fashionable updates.
CentOS is a common operating system for servers, but it is rarely used as a desktop environment because of the need for stability and no very fashionable updates. It is usually not necessary to install a desktop environment on the server, and to install CentOS (i.e. minimal CentOS) with minimal installation. However, it is also very convenient to install the desktop environment through YUM in a minimized installation of CentOS.
Unit on that server let me install a minimal CentOS operating system. But colleagues said the operation is not convenient, so I tried, by the way record this installation method. Using the Yum groupinstall command, it is easy to install a GUI-like desktop system.
1. Yum's group Instructions
Yum can install packaged packages in the program group mode. The supported packages can be passed,
# yum Grouplist
Query to. In the group software package,
For CentOS 6, desktop, desktop Platform, KDE desktop, X Window System are the main desktops.
For CentOS 7, there are two main desktop environments: KDE Plasma Workspaces and Gnome desktop.
Loaded plugins: fastestmirror, langpacksloading mirror speeds from cached hostfile * base: mirrors.usc.edu * extras: mirror.lug.udel.edu * updates: mirror.cogentco.comAvailable environment groups: Minimal Install compute node infrastructure server file and print server basic web server virtualization host server with gui gnome desktop kde plasma workspaces development and creative workstationinstalled groups: graphical administration tools legacy unix Compatibility Security Tools System Administration Toolsavailable groups: compatibility libraries console internet tools Development tools scientific support smart card support system managementdone
The list of packages is displayed according to the language used by the system and supports simplified Chinese file names. So it is best to use the above command to check before installation. If the system uses Simplified Chinese, and the installation instruction is in English, it may cause errors such as software packages to be queried. The following installation instructions are in English.
2. Installing the graphical desktop environment CentOS 7
The combination of the desktop environment installation package on CentOS 7 has been tweaked to be simpler than it used to be. There are two main camps, KDE and GNOME.
To install the KDE desktop environment (using PLASMA as the default desktop manager, very beautiful, see here),
# yum Groupinstall "KDE Plasma Workspaces"
To install the GNOME environment,
# yum Groupinstall "GNOME Desktop"
The setup program automatically resolves dependencies for the installation package and components.
CentOS 6
To install the KDE desktop environment, execute the instructions,
# yum Groupinstall "X window System" "KDE desktop" desktop
3 packages are installed at the same time. Note that because both KDE Desktop and X Window System Two package names contain spaces between them, you need to enclose them in quotation marks.
To install the Gnome desktop environment, execute the instructions,
# yum Groupinstall "X window System" "Desktop Platform" desktop
3 packages are installed at the same time, X Window System is required, whether Gnome or KDE.
Since it is a desktop environment, you may also need things like fonts, administrative tools, such as,
# yum-y Groupinstall "Graphical administration Tools" # yum-y Groupinstall "Internet Browser" # yum-y Groupinstall "Gener Al Purpose Desktop "# yum-y Groupinstall" Office Suite and Productivity "# yum-y Groupinstall" Graphics Creation Tools "
3. Enable
Start the graphical desktop environment directly from the command line,
# STARTX
This will launch the default Gnome or KDE desktop environment. If someone likes to install both GNOME and KDE, the switchover method can refer to the CentOS documentation.
If you want to automatically boot to the graphical desktop when you start, you need to modify the startup configuration. Because CentOS 7 starts using the SYSTEMD Manager, it operates differently from previous versions.
CentOS 7
In CentOS 7, you can use the SYSTEMD directive to modify the start-up status directly.
Use
# Systemctl Get-default
You can query to the state that you are currently setting. Multi-user.target is equivalent to the previous level 3, which is the command line terminal, while Graphical.target is equivalent to the previous level 5, which is the graphical interface.
So if you want to set the default boot to the graphical interface, then execute,
# Systemctl Set-default Graphical.target
CentOS 6, etc.
Edited /etc/inittab
, will be id:3:initdefault:
changed to id:5:initdefault:
. (Please note here the English half-width colon.) ) refer here.
It would be convenient to use SED directly,
Sed-i ' s/id:3:initdefault:/id:5:initdefault:/'/etc/inittab
After starting the graphical interface, if you want to switch from the graphical interface to the command line interface, you can use Ctrl + Alt + F6
(actually F1 to F6, but they represent different consoles in Linux), or Ctrl + Alt + F7
back to just the graphical interface.
Yum installs the GNOME desktop environment on Centos_linux Centos 6/7