安装GNONE桌面
1 2 3 | # 查看当前的运行级别和可以安装的group systemctl get-default yum grouplist |
如下图:

1 2 3 4 5 | # 查看安装的包有哪些内容 yum group info "Graphical Administration Tools" # 安装GNOME桌面 yum -y groups install "GNOME DESKTOP" "Graphical Administration Tools" |
安装过程中如果出现下述错误
1 | Requires: libmysqlclient.so.18()(64bit) |
注意: 我这里的CentOS版本是CentOS-7.7,安装了MySQL5.7.29
解决方案
1 2 | wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-libs-compat-5.7.22-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-compat-5.7.22-1.el7.x86_64.rpm |
接着安装
1 2 | #解决上述错误后 yum -y groups install "GNOME DESKTOP" "Graphical Administration Tools" |
安装成功。
1 2 | # 安装成功后,设置开机启动为GNOME systemctl set-default graphical.target |

1 2 | # 重启 reboot |
重启后登陆系统。
卸载GNOME桌面
1 2 3 4 5 | # 卸载GNOME桌面 yum groups remove -y "GNOME Desktop" "Graphical Administration Tools" # 卸载其他Gnome相关软件 yum remove -y gnome* |
卸载中。。。

卸载完毕。

1 2 3 4 5 | # 设置开机启动为多用户状态 systemctl set-default multi-user.target # 重启 reboot |
查看运行级别
1 2 3 | # 查看当前的运行级别和可以安装的group systemctl get-default yum grouplist |
