irst you can see all the yum groups available with the command:
yum grouplist
You can install X and Gnome or KDE like this:
yum groupinstall «X Window System» «GNOME Desktop Environment»
or
yum groupinstall «X Window System» «KDE (K Desktop Environment)»
You may also want to add some other groups from the list like «Graphical Internet» or «Office/Productivity»