CentOS 7 Minimal++ (Virtual) Setup

CentOS 7 Xfce Desktop

CentOS 7 Xfce Desktop

Introduction

This note covers the setup of a CentOS 7 minimal image on a VMware Workstation host.

Included are the steps to install a basic windowing system such as Xfce as well as how to install VMware tools.

The minimal version of Centos is pretty incomplete; not even the networking works out of the box.

Using these directions you can install the minimal version, add a windowing system such as Xfce and install VMware tools so that you can use a high resolution desktop.

The main benefit of doing things this way is that you avoid the crud the full desktop installs provide. I don’t want or need Enlightment, OpenOffice or many of the dozens of other packages that are typically installed by default.

Getting Started

First thing, create a new machine and boot from the minimal ISO to install CentOS 7.

Enable Networking

After you’ve logged in for the first time you will need to enable networking, first by determining the name of your network interface and then enabling that interface: (Yes, ifconfig is missing; it’s added with the net-tools package later in the install process.)

sudo ip a sh
sudo /etc/sysconfig/network-scripts/ifup eno16777736

Now adjust the configuration so that networking is enabled at boot.

sudo vi /etc/sysconfig/network-scripts/ifcfg-eno16777736 

change ONBOOT=no to ONBOOT=yes

Apply Patches

After that you should update your system to ensure you’ve got the latest patches.

sudo yum update

Add Xfce Repo

Freshly patched, it’s time to add the repo that allows you to install Xfce.

sudo yum install http://epel.mirror.nucleus.be/beta/7/x86_64/epel-release-7-1.noarch.rpm

Install X and Xfce

Go ahead and install X and Xfce.

sudo yum groupinstall "X Window system" xfce -y

At this point you should have a working windowing system. You can test it by starting Xfce: (Note: full resolution of your monitor is not available until the VMware tools have been installed. Also note that you will need to reboot to continue if you start Xfce at this point.)

sudo systemctl isolate graphical.target

Prepare for VMware Tools Install

To finish, first install the packages required by the VMware tools installation:

sudo yum install perl gcc net-tools kernel-headers kernel-devel xterm -y

Log out and log in to continue. Otherwise the installer won’t find the kernel headers.

Install VMware Tools

Initiate the VMware tools installation from the VMware console. Then install the VMware tools:

sudo mount /dev/cdrom /media
cd /tmp
tar -xvf /media/VMwareTools-9.6.2-1688356.tar.gz 
cd vmware-tools-distrib/
sudo perl vmware-install.pl 

The installation notes an error related to the shared folder feature; a fix is unknown at this time but other than the missing functionality of shared folders this bug doesn’t affect the system in any other way.

Starting Xfce Automatically

If you want Xfce to start at boot time, perform the following steps:

sudo rm /etc/systemd/system/default.target
sudo ln -s /lib/systemd/system/graphical.target /etc/systemd/system/default.target

If you prefer to start Xfce manually, do the following:

sudo systemctl isolate graphical.target

Resources

Sites referenced to create this guide:

http://www.centos.org/

http://serverfault.com/questions/611122/centos-7-minimal-install-doesnt-comes-with-networks-scripts-which-version-to-u

http://jensd.be/?p=125

http://gab-tech.blogspot.com/2014/07/installing-vmware-tools-in-centos-7.html

http://community.spiceworks.com/how_to/show/2805-vmware-tools-on-centos

http://unix.stackexchange.com/questions/36241/centos-eth0-not-starting

http://sharadchhetri.com/2014/07/25/ifconfig-command-found-centos-7/

https://thevagabondgeek.com/centos-yum-groupinstall-basics/

Error Listing

Full text of error:

In file included from /tmp/modconfig-PRAvXo/vmhgfs-only/inode.c:36:0:
/tmp/modconfig-PRAvXo/vmhgfs-only/inode.c: In function ‘HgfsPermission’:
/tmp/modconfig-PRAvXo/vmhgfs-only/./shared/compat_dcache.h:57:38: \
error: ‘struct dentry’ has no member named ‘d_count’
 #define compat_d_count(dentry) dentry->d_count
                                      ^
/tmp/modconfig-PRAvXo/vmhgfs-only/inode.c:1904:23: note: in expansion of macro compat_d_count’
          int dcount = compat_d_count(dentry);
                       ^
make
[2]: *** [/tmp/modconfig-PRAvXo/vmhgfs-only/inode.o] Error 1 make[1]: *** [_module_/tmp/modconfig-PRAvXo/vmhgfs-only] Error 2 make[1]: Leaving directory `/usr/src/kernels/3.10.0-123.8.1.el7.x86_64' make: *** [vmhgfs.ko] Error 2 make: Leaving directory `/tmp/modconfig-PRAvXo/vmhgfs-only' The filesystem driver (vmhgfs module) is used only for the shared folder feature. The rest of the software provided by VMware Tools is designed to work independently of this feature. If you wish to have the shared folders feature, you can install the driver by running vmware-config-tools.pl again after making sure that gcc, binutils, make and the kernel sources for your running kernel are installed on your machine. These packages are available on your distribution's installation CD.
September 28th, 2014|Categories: Technology|Tags: , , , , |2 Comments

2 Comments

  1. Johnny October 14, 2014 at 4:25 pm

    Hi
    Thanks for your guide, it works great. even with vmtool, but, open-vm tools might be better.
    But, can we also install tiger VNC on xfce ?
    I can run it fine on gnome, but witch the same setting on xfce, I cannot log into.. ? If you may have tried.. or perhaps it’s another tutorial.
    Thanks

  2. Lucca April 20, 2015 at 6:05 am

    Thanks for this. Minimal + Xfce is a nice combination. Just one thing to add re the error related to the shared folder feature. Someone pointed me to a fix that fixed shared-folder access for me (using CentOS 7). The post is here – Error VMWare Tools Shared Folder RedHat 7 at https://blog.linuxcoding.org/artikel/perbaiki-error-vmware-tools-shared-folder-redhat-7/. It’s not English (Indonesian) but you only need to read the code listings. If you want to read the text, use Google Translate (http://bit.ly/1JYEiCl) but it does mess up the code listings. Also, you do need to add 2 packages to your CentOS 7 minimal install – patch and wget ($ sudo yum install patch wget).

Comments are closed.