RHEL6 纯命令行界面下安装图形界面

在虚拟机下安装Red Hat Enterprise Linux 6.1时,如果内存为512M或更小时,安装过程会提示内存太小,无法启用图形界面。这样,就只能是最小化安装。装好后,怎样安装桌面呢。


一、配置yum库
vmware下的虚拟光驱位于/dev/sr0,所以,向vmware加载RHEL6.1的镜像后,就可以配置yum库了
1.挂载镜像
[root@redhat ~]#   mkdir /media/rhel
[root@redhat ~]#   mount -o loop /dev/sr0 /media/rhel
 
2.使镜像能开机自动挂载
在/etc/fstab的最下面添加下面一句
[root@redhat ~]#   vi /etc/fstab
/dev/sr0                /media/rhel            iso9660       ro,loop         0 0
 
3.新建一个本地repo文件
紫色的部分可以不要添加,只要黑体那部分就行了。
[root@redhat ~]#   vi /etc/yum.repos.d/local.repo

[Server]
name=Server
baseurl=file:///media/rhel/Server
enabled=1
gpgcheck=0

[HighAvailability]
name=HighAvailability
baseurl=file:///media/rhel/HighAvailability
enabled=1
gpgcheck=0

[LoadBalancer]
name=LoadBalancer
baseurl=file:///media/rhel/LoadBalancer
enabled=1
gpgcheck=0

 
二、安装桌面
 
1.检查软件组
查看一下桌面在哪个软件组里
[root@redhat ~]#  yum grouplist
Loaded plugins: refresh-packagekit
Setting up Group Process
HighAvailability/group_gz                                | 4.0 kB     00:00 ... 
LoadBalancer/group_gz                                    | 2.1 kB     00:00 ... 
Installed Groups:
   Additional Development
   Base
   Console internet tools
   Desktop
   Desktop Debugging and Performance Tools
   Dial-up Networking Support
   E-mail server
   FCoE Storage Client
   FTP server
   Fonts
   General Purpose Desktop
   Graphical Administration Tools
   Hardware monitoring utilities
   Input Methods
   Legacy UNIX compatibility
   Legacy X Window System compatibility
   NFS file server
   Network Infrastructure Server
   Network file system client
   Networking Tools
   Performance Tools
   Perl Support
   Remote Desktop Clients
   Security Tools
   Smart card support
   Storage Availability Tools
   System administration tools
   X Window System
   iSCSI Storage Client
Installed Language Groups:
   Arabic Support [ar]
   Armenian Support [hy]
   Assamese Support [as]
   Bengali Support [bn]
   Bhutanese Support [dz]
   Chinese Support [zh]
   Ethiopic Support [am]
   Georgian Support [ka]
   Gujarati Support [gu]
   Hebrew Support [he]
   Hindi Support [hi]
   Inuktitut Support [iu]
   Japanese Support [ja]
   Kannada Support [kn]
   Khmer Support [km]
   Konkani Support [kok]
   Korean Support [ko]
   Kurdish Support [ku]
   Lao Support [lo]
   Maithili Support [mai]
   Malayalam Support [ml]
   Marathi Support [mr]
   Myanmar (Burmese) Support [my]
   Oriya Support [or]
   Punjabi Support [pa]
   Sinhala Support [si]
   Tajik Support [tg]
   Tamil Support [ta]
   Telugu Support [te]
   Thai Support [th]
   Urdu Support [ur]
   Venda Support [ve]
Available Groups:
   Backup Client
   Backup Server
   CIFS file server
   Client management tools
   Compatibility libraries
   Debugging Tools
   Desktop Platform
   Desktop Platform Development
   Development tools
   Directory Client
   Directory Server
   Eclipse
   Emacs
   Enterprise Identity Server Base
   Graphics Creation Tools
   High Availability
   High Availability Management
   Infiniband Support
   Internet Browser
   Java Platform
   KDE Desktop
   Large Systems Performance
   Load Balancer
   Mainframe Access
   Messaging Client Support
   MySQL Database client
   MySQL Database server
   Network Storage Server
   PHP Support
   PostgreSQL Database client
   PostgreSQL Database server
   Print Server
   Printing client
   SNMP Support
   Scientific support
   Server Platform
   Server Platform Development
   Somali Support
   System Management
   Systems Management Messaging Server support
   TeX support
   Technical Writing
   TurboGears application framework
   Virtualization
   Virtualization Client
   Virtualization Platform
   Virtualization Tools
   Web Server
   Web Servlet Engine
   Web-Based Enterprise Management
Available Language Groups:
   Afrikaans Support [af]
   Albanian Support [sq]
   Amazigh Support [ber]
   Azerbaijani Support [az]
   Basque Support [eu]
   Belarusian Support [be]
   Brazilian Portuguese Support [pt_BR]
   Breton Support [br]
   Bulgarian Support [bg]
   Catalan Support [ca]
   Chhattisgarhi Support [hne]
   Chichewa Support [ny]
   Coptic Support [cop]
   Croatian Support [hr]
   Czech Support [cs]
   Danish Support [da]
   Dutch Support [nl]
   English (UK) Support [en_GB]
   Esperanto Support [eo]
   Estonian Support [et]
   Faroese Support [fo]
   Fijian Support [fj]
   Filipino Support [fil]
   Finnish Support [fi]
   French Support [fr]
   Frisian Support [fy]
   Friulian Support [fur]
   Gaelic Support [gd]
   Galician Support [gl]
   German Support [de]
   Greek Support [el]
   Hiligaynon Support [hil]
   Hungarian Support [hu]
   Icelandic Support [is]
   Indonesian Support [id]
   Interlingua Support [ia]
   Irish Support [ga]
   Italian Support [it]
   Kashmiri Support [ks]
   Kashubian Support [csb]
   Kazakh Support [kk]
   Kinyarwanda Support [rw]
   Latin Support [la]
   Latvian Support [lv]
   Lithuanian Support [lt]
   Low Saxon Support [nds]
   Luxembourgish Support [lb]
   Macedonian Support [mk]
   Malagasy Support [mg]
   Malay Support [ms]
   Maltese Support [mt]
   Manx Support [gv]
   Maori Support [mi]
   Mongolian Support [mn]
   Nepali Support [ne]
   Northern Sotho Support [nso]
   Norwegian Support [nb]
   Occitan Support [oc]
   Persian Support [fa]
   Polish Support [pl]
   Portuguese Support [pt]
   Romanian Support [ro]
   Russian Support [ru]
   Sanskrit Support [sa]
   Sardinian Support [sc]
   Serbian Support [sr]
   Sindhi Support [sd]
   Slovak Support [sk]
   Slovenian Support [sl]
   Southern Ndebele Support [nr]
   Southern Sotho Support [st]
   Spanish Support [es]
   Swahili Support [sw]
   Swati Support [ss]
   Swedish Support [sv]
   Tagalog Support [tl]
   Tetum Support [tet]
   Tibetan Support [bo]
   Tsonga Support [ts]
   Tswana Support [tn]
   Turkish Support [tr]
   Turkmen Support [tk]
   Ukrainian Support [uk]
   Upper Sorbian Support [hsb]
   Uzbek Support [uz]
   Vietnamese Support [vi]
   Walloon Support [wa]
   Welsh Support [cy]
   Xhosa Support [xh]
   Zulu Support [zu]
Done

2.安装桌面
桌面在软件组desktop中,这和rhel5不太一样,rhel5里面好像为gnome
那么就开始安装桌面吧,但之前必须先安装Xwindow软件组
[root@redhat ~]#  yum groupinstall “X Window System”
[root@redhat ~]#  yum groupinstall “Desktop”
3. 虽然到此就可以启动桌面了,但是 linux建议不要让root用户直接登录图形界面
    所以,我们最好再创建一个普通用户
[root@redhat ~]#   useradd kevin
创建kevin的密码
[root@redhat ~]#   passwd kevin
4.启动X:
首先 切换到普通用户
  [root@redhat ~]#  su - kevin
 [kevin@redhat ~] $ startx
5.更改启动模式
这时如果重启的话还是会直接进入命令界面,所以必须调整开机进入桌面还是命令界面
[root@redhat ~]# vim /etc/inittab
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)

id:3:initdefault:
 将上面红字部分的  3改成5
 3为命令行界面   5为X window图形界面

5.删除redhat订阅:
rhel6.1新增了一个redhat订阅,没有用,可以删除
[root@redhat ~]#  yum remove subscription*
6.安装桌面右键终端:
[root@redhat ~]#  yum install nautilus-open-terminal
已标记关键词 清除标记
课程简介: 历经半个多月的时间,Debug亲自撸的 “企业员工角色权限管理平台” 终于完成了。正如字面意思,本课程讲解的是一个真正意义上的、企业级的项目实战,主要介绍了企业级应用系统中后端应用权限的管理,其中主要涵盖了六大核心业务模块、十几张数据库表。 其中的核心业务模块主要包括用户模块、部门模块、岗位模块、角色模块、菜单模块和系统日志模块;与此同时,Debug还亲自撸了额外的附属模块,包括字典管理模块、商品分类模块以及考勤管理模块等等,主要是为了更好地巩固相应的技术栈以及企业应用系统业务模块的开发流程! 核心技术栈列表: 值得介绍的是,本课程在技术栈层面涵盖了前端和后端的大部分常用技术,包括Spring Boot、Spring MVC、Mybatis、Mybatis-Plus、Shiro(身份认证与资源授权跟会话等等)、Spring AOP、防止XSS攻击、防止SQL注入攻击、过滤器Filter、验证码Kaptcha、热部署插件Devtools、POI、Vue、LayUI、ElementUI、JQuery、HTML、Bootstrap、Freemarker、一键打包部署运行工具Wagon等等,如下图所示: 课程内容与收益: 总的来说,本课程是一门具有很强实践性质的“项目实战”课程,即“企业应用员工角色权限管理平台”,主要介绍了当前企业级应用系统中员工、部门、岗位、角色、权限、菜单以及其他实体模块的管理;其中,还重点讲解了如何基于Shiro的资源授权实现员工-角色-操作权限、员工-角色-数据权限的管理;在课程的最后,还介绍了如何实现一键打包上传部署运行项目等等。如下图所示为本权限管理平台的数据库设计图: 以下为项目整体的运行效果截图: 值得一提的是,在本课程中,Debug也向各位小伙伴介绍了如何在企业级应用系统业务模块的开发中,前端到后端再到数据库,最后再到服务器的上线部署运行等流程,如下图所示:
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页