1、yum -y groupinstall "X Window System"
2、yum -y groupinstall "GNOME Desktop" "Graphical Administration Tools" (若报错"Transaction check error: file /boot/efi/EFI/centos from install of fwupdate-efi-12-6.el7.centos.x8",执行yum update grub2-common后再安装一次)
3、echo "startx" >> /etc/rc.d/rc.local
4、startx
注:若出现"xinit: connection to X server lost"报错,需要 'yum update --skip-broken --setopt=protected_multilib=false' 之后再reboot重启即可。