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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章