centos7最小化安装后再安装GNOME图形化界面
安装桌面组件包
yum -y groupinstall “GNOME Desktop”
yum -y groupinstall “X Window System”
yum groupinstall "KDE Desktop" (centos6)
启动桌面startx
startx
查看默认运行级别
systemctl get-default
设置默认运行级别
systemctl set-default graphical.target
rm ‘/etc/systemd/system/default.target’
ln -s ‘/usr/lib/systemd/system/graphical.target’ ‘/etc/systemd/system/default.target’
注:可通过 /etc/inittab 文件,查询图形化界面的运行级别
[[email protected] ~]# cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
#
# systemd uses ‘targets‘ instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5 (运行级别5)
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target
(此外)
测试是否安装成功
使用 init 5命令进入图形化界面,如果成功的话,你将会进入图形化界面的初始界面。
如何卸载图形化界面
利用组卸载命令 yum groupremove +组包名即可,其中组包名就是我们之前上面安装的那个就可以了。
参考文章:
http://www.linuxidc.com/Linux/2017-03/141348.htm
http://www.linuxidc.com/Linux/2015-12/126690.htm**
原文地址:https://blog.51cto.com/14535577/2443778
时间: 2024-11-08 19:53:19