[root@centos7 ~]#yum install epel-release -y
[root@centos7 ~]#yum groupinstall "Server with GUI" -y
[root@centos7 ~]#yum groupinstall "Xfce" -y
[root@centos7 ~]#systemctl get-default
graphical.target
In this instance the target has been updated appropriately by installing
these package groups. If it instead said multi-user.target, then you
would need to update it manually.
[root@centos7 ~]#systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.[root@centos7 ~]#systemctl get-defaultgraphical.target
systemctl isolate graphical.target
[root@centos7 ~]#yum groupremove "Xfce"