centos7 install xwindow
首先输入第一段代码:
yum groupinstall 'X Window System' -y
然后继续输入第二段代码:
yum groupinstall GNOME Desktop Environment -y
启动:startx
查看当前的开机默认运行方式:
systemctl get-default
设置开机不自启图形界面:
systemctl set-default multi-user.target
设置开机启动图形界面:
systemctl set-default graphical.target
安装过程如遇报错:Transaction check error:
file /boot/efi/EFI/centos from install of fwupdate-efi-12-5.el7.centos.x86_64 conflicts with file from package grub2-common-1:2.02-0.65.el7.centos.2.noarch
用 yum upgrade -y 只升级所有包,不升级软件和系统内核,再进行安装即可。