首页 技术 正文
技术 2022年11月16日
0 收藏 964 点赞 4,158 浏览 1790 个字

Linux是一个多任务的多用户的操作系统,好多linux爱好者在安装完linux后经常遇到一个问题——没有图形化桌面。今天小编在安装RHEL7的时候,一步留神没有安装图形化桌面,下面分享一下安装图形化桌面的过程。

一、RHEL7 系统安装——发现默认没有桌面

在安装的时候没有注意选择的是默认的“Minimal Install”,安装完后是这个样子的: RHEL/Centos7 安装图形化桌面 RHEL/Centos7 安装图形化桌面 命令行的界面的,好不爽。登录进去,启动图形化试试: RHEL/Centos7 安装图形化桌面 果然没有安装图形化。下面来进行图形化组件的安装。

二、安装图形化组件先挂载

#mount /dev/sr0 /mnt                          \\  把光盘挂载到“/mnt”上面
#df                                            \\查看是否已经挂载

RHEL/Centos7 安装图形化桌面

创建本地yum仓库

验证本地yum仓库,找出要需要安装组件组的包名称 RHEL/Centos7 安装图形化桌面

 #yum clean all                            \\  清楚yum仓库缓存
#yum makecache                            \\ 创建yum仓库缓存
#yum repolist                      \\ 列出可用yum仓库
#yum grouplist                     \\ 列出程序组

RHEL/Centos7 安装图形化桌面 安装桌面组件包 #yum -y groupinstall “Server with GUI”      \\ 安装图形化程序组

RHEL/Centos7 安装图形化桌面三、设置图形化默认启动

启动桌面——startx

#startx                                                           \\ 启动xwindow 进入图形化桌面

RHEL/Centos7 安装图形化桌面

RHEL/Centos7 安装图形化桌面进入图形化,进行图形化的设置

RHEL/Centos7 安装图形化桌面

设置默认运行级别为图形化

[root@localhost Desktop]# systemctl get-default          \\查看默认运行级别
multi-user.target
[root@localhost Desktop]# 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 /etc/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 \\运行级别3:多用户界面
# graphical.target: analogous to runlevel 5 \\运行级别5:图形化界面
# # To set a default target, run: # # ln -sf /lib/systemd/system/.target /etc/systemd/system/default.target #
[root@localhost Desktop]# systemctl set-default graphical.target \\设置默认图形化运行级别
rm '/etc/systemd/system/default.target'
ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target'
[root@localhost Desktop]# systemctl get-default                  \\查看默认运行级别
graphical.target                                                    \\图形化设置OK
[root@localhost Desktop]#

RHEL/Centos7 安装图形化桌面

OK,图形化桌面已经安装好了!!!

ps:linux系统启动后没有进入图形化有以下原因:

1.系统在安装的时候没有安装图形化2.系统的默认运行级别不是图形化3.系统在安装后,有降低过内存的操作,内存过低无法启动桌面。
解决方案:a.增加内存
b.查看swap的大小,尝试扩大swap分区4.系统在重启后,软件出现了问题,导致桌面没有启动RHEL 7 在系统上与6 有了不同的改变,没有了init运行级别,只有3级别和5级别。

免费提供最新Linux技术教程书籍,为开源技术爱好者努力做得更多更好:https://www.linuxprobe.com/

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,026
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,517
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,364
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,145
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,779
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,856