If you have made a minimal CentoOS installation you can always install Graphical User interface as part of group packages. Let's first list all available package groups on the system:
# yum group list
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
* base: centos.mirror.crucial.com.au
* extras: centos.mirror.crucial.com.au
* updates: centos.mirror.crucial.com.au
Available environment groups:
File and Print Server
Basic Web Server
Server with GUI
KDE Plasma Workspaces
Development and Creative Workstation
Console Internet Tools
Graphical Administration Tools
Legacy UNIX Compatibility
Smart Card Support
System Administration Tools
From here we can choose any package group we wish to install. In our case we are interested in Server with GUI or GNOME Desktop. The difference between both Server with GUI and GNOME Desktop package groups is that Server with GUI will along GNOME GUI also install some extra server packages. The get more information about each package group run:
SUBSCRIBE TO NEWSLETTER Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.
# yum groupinfo "Server with GUI"
# yum groupinfo "GNOME Desktop"
Depending on your decision now install you selected package group. Eg.:
# yum groupinstall 'GNOME Desktop'
The above command will install all necessary packages required by Gnome Desktop GUI. Once the installation is finished the last step which remains is to change system target or runlevel from runlevel 3 to runlevel 5. This will ensure that we directly boot to GNOME GUI: