Linux admins spend most of their time on working in a terminal; there are some who like to work on GUI instead of a terminal. By default, CentOS 7 installed as the minimal server, and user intervention is required to change the installation type. This guide will help you to install GUI on CentOS 7 on the top of the minimal server installation.
Before installing GUI, make a Local Yum Repository to avoid downloading packages from the internet.
READ: How to Configure YUM repository on CentOS 7 / RHEL 7
Optional: Run the following command to list down the available package groups for CentOS 7.
# yum group list
Output:
Loaded plugins: fastestmirror There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Loading mirror speeds from cached hostfile Available 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 Workstation 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
Step 1: Install Gnome GUI packages using the YUM command.
CentOS 7:
# yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
RHEL 7:
# yum groupinstall "Server with GUI"
Step 2: Enable GUI on system startup. In CentOS 7 / RHEL 7, systemd uses “targets” instead of runlevel. The /etc/inittab file is no more used to change run levels. So, issue the following command to enable the GUI on system start.
# ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
Step 3: Reboot the machine to start the server in the graphical mode.
# reboot
License Agreement:
Accept the license by clicking on the “LICENSE INFORMATION“.
Tick mark the “I accept the license agreement” and click on “Done“.
Click on “FINISH CONFIGURATION” to complete the setup.
You may need to do some post configuration tasks, like creating first user (local account), language, etc.
Then finally you will get the desktop.
That’s All. You have successfully installed GUI on CentOS 7 / RHEL 7.
Thank you so much.
Glad this helped you.
Hi ,
Can you provide a tutorial on how to install RemoteDesktop (not vnc) on centos 7 (xrdp)
Thank You,
Hi umkanth,
Soon you can expect here
Hi Mike,
New how to made for xrdp on CentOS 7. Use the following link.
https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html
Just what I was looking for! Excellent
Exactly the info I needed. Thank you. Tried it, but with no result, System still boots into CLI. Target file exists, link looks good… Hmm.. Will investigate more. Thank you anyway.
Thanks much!
This was what I needed. You rock!! 🙂
Thank you about your post, It’s really useful!
google documans
First, thank you for your manual.
After installation, system starts fine. I installed it on Virtualbox. Installed the VirtualBox modules. Restarted system. Logged in to TTY as user. Run startx. GNOME starts. Everything is ok. Now, I wanted, that the GUI will start automatically and took the ln -sf… order. After reboot the GUI starts. Now logged in with user account and GNOME crashed. Had to log out. Could it be, that I deleted the original default.target file? When I start the GUI with user root the GUI starts without problems.
Thank you so much!
Make sure initial install with minimal server instead
Shouldnt step 2 be …
systemctl set-default graphical.target
… the correct way to change the runlevel on systemd?
Dear Nick,
It can be done in two ways, i explained in
https://www.itzgeek.com/how-tos/linux/centos-how-tos/change-default-runlevel-in-centos-7-rhel-7.html
Hey bro, Im following your tut, but when I rebooted the VPS (CentOS 7), I cannot ssh to it again, can you tell me why?
Hi,
I faced same issue, do not change the run level after the gnome installation. Let that boot in 3 run level, configure either xrdp or VNC to take graphical display
thanks a lot,its working.
very very good !!!
it was a nice post for me ! 😉
my vm ended up with black screen..after executing “ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target” and rebooting.
Same problem here. I m in a vm too.
Same here haha. Did you guys figure out how to fix it?
hahaha…rebooted the vm about three times hoping to get an extra option to enable or download gui package 🙂 and yum group list isn’t working as well
From: https://wiki.centos.org/Manuals/ReleaseNotes/CentOS7
In VirtualBox up to version 4.3.12 the building of the vBox additions fails. This is solved starting with version 4.3.14. On Windows hosts there still seem to be some issues with versions up to 4.3.16. After installing vBox additions logging in to GNOME Desktop results in a black screen or a terminating VM.
Not sure if this is still an issue but I was having the same issue with a VirtualBox VM. I installed a fresh VM and repeated the same steps but didn’t run this command.
When I tried to run ‘startx’ I kept getting an error and was eventually able to track it down to an error like “ImportError: No module named _isys”.
Eventually I just ran ‘yum update’ and it solved the issue.
Hope this helps
A “yum update” also fixed the issue for me
Thanks, it worked!
Strange the installation didn’t install de GUI packages even when I hade chosen Server with Gui. This did the trick though…..!
F@#$%&* Awesome!!! Thanks a bunch!
Working very nicely – just make sure you install gnome to avoid disappointment 🙂
Probably a stupid question…. I have a dedicated server about 5000 miles from me. It runs Centos 7 with Cpanel/WHM and i have reboot capability (soft and hard). Would this install work purely via my ssh (root) access, given I will never be sitting in front of this device keyboard/monitor. I plan to install xrdp or VNC once I have this GNOME installed, but will need it to load without keyboard inputs/local setup on first reboot after install. Hope I am making sense.
Of course it will work through ssh. You’re only installing a package, you’re not actually entering gnome through ssh.
It worked!., i had the same Eva Promem’s. Instaling Gnome do the trick
Thanks bro…….helped a lot…………………..nice post
Thanks… it worked… 🙂
Great !
Didn’t work for me, rebooted and still pulling up terminal
init 5
Good 🙂
yum groupinstall “GNOME Desktop” “Graphical Administration Tools”
on Centos 7
is not working
It should work, make sure you have CentOS base repository enabled on your system.
This one worked:
#yum -y groups install “GNOME Desktop”
#startx /** to start gnome **/
For me worked.
Very nice, work perfectly. Thanks to share.
Worked flawlessly with CentOS 7. Thank youo very much!
Thanks! It worked like a charm.
After the whole download process my screen went black and then when I pressed enter, it showed up that I was supposed to type “y” to confirm something and now I think I must have not confirmed to install. Is that correct?
Nvm, after being asked to download it again, it knows that files have already been downloaded so it just installs those.
Thanks! That was easy for Centos 7.4 64-bit.
Many thanks. It sure took me to the GUI after reboot
There is a error with step #1
CentOS 7
# yum group install “GNOME Desktop” “Graphical Administration Tools”
There shouldn’t be a space between group and install this should read
CentOS 7
# yum groupinstall “GNOME Desktop” “Graphical Administration Tools”
Thanks.
Both commands are same and it should work.