上一篇在講 VirtualBox 加強包安裝的時候,由於沒有在 CentOS 7 mini 沒有圖形界面組件,會出現一些錯誤,這篇講講如何在 mini 的基礎上,把圖形桌面安裝上去。segmentfault
經過上篇操做,virtualbox 上的 CentOS 和宿主機之間已支持文件夾共享,仍是沒法鼠標自由切換,主要是由於 CentOS mini 安裝只有字符界面,不支持鼠標。還需對系統安裝桌面系統。centos
首先列出如下當前已安裝和支持安裝的包組this
yum grouplist
可能會看到以下的顯示:centos7
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
爲已安裝的包組。spa
若是已安裝包組裏面沒有GNOME Desktop
,直接執行下面命令unix
yum groupinstall ‘GNOME Desktop’
便可安裝圖形界面。
安裝完畢,執行code
startx
啓動圖形界面。server
若是安裝不成功,也能夠嘗試先進行 X 系統安裝。以下:blog
If CentOS has already been installed without a graphical interface,
you can install this with the following commands:ci
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
原本本文還介紹了 VNC 的安裝配置,鑑於這個內容和本篇文章不是很搭,因此單獨出來了。
如有興趣的,點擊《CentOS 上安裝配置 VNC 服務》穿越。
到這裏,個人《CentOS7 在 VirtualBox 上的安裝配置》系列暫告一段落。辛辛苦苦截圖碼字很不容易哦,這也是我發在 SF 上的第一個系列文章,喜歡的朋友記得推薦點贊哦。? ?
順便放出寫本系列文章的時候,Google 到的一些參考文章。