RHEL7 默认是最小化安装(Minimal Install),没有图形界面,
我们应该选择Server with GUI。若已错过此步骤,我们采用以下方式补充安装GUI界面。
# yum group list
Available Environment Groups:Minimal InstallCompute NodeInfrastructure ServerFile and Print ServerBasic Web ServerVirtualization HostServer with GUIGNOME DesktopKDE Plasma WorkspacesDevelopment and Creative Workstation
Available Groups:Compatibility LibrariesConsole Internet ToolsDevelopment ToolsGraphical Administration ToolsLegacy UNIX CompatibilityScientific SupportSecurity ToolsSmart Card SupportSystem Administration ToolsSystem Management
# yum -y groupinstall "Server with GUI"
启动X11图形界面
# startx
修改默认运行级别/目标
# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target //图形模式
# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target //图形模式
使用systemctl来切换
# systemctl -f enable multi-user.target //文字模式
# systemctl -f enable graphical.target //图形模式