CentOS7 在 VirtualBox 上的安装配置 -- 图形界面安装篇

给 CentOS 安装图形界面

通过上篇操作,virtualbox 上的 CentOS 和宿主机之间已支持文件夹共享,还是无法鼠标自由切换,主要是因为 CentOS mini 安装只有字符界面,不支持鼠标。还需对系统安装桌面系统。

首先列出以下当前已安装和支持安装的包组

yum grouplist

可能会看到如下的显示:

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.163.com
Installed Environment Groups:
   GNOME Desktop
Available Environment Groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI
   KDE Plasma Workspaces
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done

这个命令列出来的实际上是centos7安装时提供的安装类型选项。Installed Environment Groups 为已安装的包组。

如果已安装包组里面没有GNOME Desktop,直接执行下面命令

yum groupinstall ‘GNOME Desktop’

即可安装图形界面。
安装完毕,执行

startx

启动图形界面。

如果安装不成功,也可以尝试先进行 X 系统安装。如下:

If CentOS has already been installed without a graphical interface,
you can install this with the following commands:

yum groupinstall "X Window System" 
yum install gdm

If you would like this to be the default runlevel, you can edit
/etc/inittab and set the default level to 5 instead of 3:

vi /etc/inittab

Change:

id:3:initdefault:

To:

id:5:initdefault:

图形界面安装成功后,reboot 机器,并重装virtualbox 增强包

cd /media/cdrom
./VBoxLinuxAdditions.run
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值