阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

CentOS/RHEL最小化安装图形化

214次阅读
没有评论

共计 3132 个字符,预计需要花费 8 分钟才能阅读完成。

图形化,一般不再服务器中安装。为了提升系统的利用率。

CentOS 的 yum 源对应 CentOS 的源

RHEL 的 yum 源对应 RHEL 的源

我演示的 CentOS 6.5,我挂载的 RHEL6.5 的源。作为软件源,仅作思路梳理!

01、挂载 ISO 配置本地 yum 源

ISO 挂载

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

配置 yum

vi /etc/yum.repo.cdrom.repo

[rhel]

name=rhel

baseurl=file:///mnt

gpgcheck=0

enabled=1

测试 yum

yum makecache

yum repolist

02、安装图形化组件

此组件列表是 RHEL6.5 的 ISO 源 –X Window System,Centos6.5 图形化组件 –Server with GUI
[root@jiao ~]# yum grouplist  #查看群组件
Loaded plugins: fastestmirror
Setting up Group Process
Repository ‘rhel’ is missing name in configuration, using id
Loading mirror speeds from cached hostfile
rhel/group_gz                                      | 204 kB    00:00 …
Installed Groups:
  Additional Development
  E-mail server
  General Purpose Desktop
  Graphical Administration Tools
  Legacy X Window System compatibility
  Perl Support
  Security Tools
  Web Server
Available Groups:
  Backup Client
  Backup Server
  Base
  CIFS file server
  Client management tools
  Compatibility libraries
  Console internet tools
  Debugging Tools
  Desktop
  Desktop Debugging and Performance Tools
  Desktop Platform
  Desktop Platform Development
  Development tools
  Dial-up Networking Support
  Directory Client
  Directory Server
  Eclipse
  Emacs
  FCoE Storage Client
  FTP server
  Fonts
  Graphics Creation Tools
  Hardware monitoring utilities
  Identity Management Server
  Infiniband Support
  Input Methods
  Internet Browser
  Java Platform
  KDE Desktop
  Large Systems Performance
  Legacy UNIX compatibility
  Mainframe Access
  Messaging Client Support
  MySQL Database client
  MySQL Database server
  NFS file server
  Network Infrastructure Server
  Network Storage Server
  Network file system client
  Networking Tools
  PHP Support
  Performance Tools
  PostgreSQL Database client
  PostgreSQL Database server
  Print Server
  Printing client
  Remote Desktop Clients
  Ruby Support
  SNMP Support
  Scientific support
  Server Platform
  Server Platform Development
  Smart card support
  Storage Availability Tools
  System Management
  System administration tools
  TeX support
  Technical Writing
  TurboGears application framework
  Virtualization
  Virtualization Client
  Virtualization Platform
  Virtualization Tools
  Web Servlet Engine
  Web-Based Enterprise Management
  X Window System
  iSCSI Storage Client
Available Language Groups:
  Afrikaans Support [af]
  Albanian Support [sq]
  Amazigh Support [ber]
   
 #yum -y groupinstall “Server with GUI”      \\ 安装图形化程序组

启动图形化 startx


RHEL7 命令

[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]#

本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-03/141345.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计3132字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中