Thursday, June 18, 2015

Installing CentOS 7 with MATE Desktop

I recently upgraded one of my labs from CentOS 6.x to CentOS 7.  These are my notes installing CentOS 7 with the MATE desktop.  Although I installed CentOS on physical hardware, this example installs the OS in a VirtualBox virtual machine.

There are a few configuration choices I made that I prefer and fit my environment.  I installed the MATE Desktop over the default Gnome, created standard partitions instead of LVM, and created a single ext4 file system with a separate swap partition instead of the new xfs default file system.

The first steps, of course, are to download the ISO and create the virtual machine.  Then begin the installation.

Figure 1: Initial install screen.

After selecting Install CentOS 7, select the installation language.

Figure 2: Selecting the default language.
The resulting installation summary screen is where a lot of the initial install configuration is done.  Note that the default Software Selection is a "Minimal install", i.e. text only installation, no desktop environment will be installed.

Click on Installation Destination to modify the disk layout scheme (Figure 3).

Figure 3: Installation Summary screen.
In the Installation Destination screen (Figure 4) make sure the hard drive is selected with a check mark.  Choose the I will configure partitioning radio button, then click the Done button in the upper left hand section of the screen.

Figure 4: Selecting the Installation Destination
After the destination drive is selected, the partitioning scheme is configured.  In the Manual Partitioning screen (Figure 5), click the drop down box under New CentOS Installation to change from LVM to Standard Partition.  Note on the bottom left of the screen, the total space and available space are indicated.  Click on the plus (+) button to create a new partition.

Figure 5: Manual Partitioning
In the pop up dialog (Figure 6), select the / (root) partition and the desired capacity of the partition, then click Add mount point.

Figure 6: Create root partition
The Manual Partitioning screen will reappear.  In the File System drop down box, click on the drop down to select ext4 as the file system.

Figure 7: Set the ext4 file system

In the Manual Partitioning screen click the plus (+) button again to create the swap partition (Figure 8).

Figure 8: Swap partition created.
Click the Done button to complete partitioning.  A summary (Figure 9) will display what changes will be made to the hard drive.  Verify the changes and then click the Accept Changes button.

Figure 9: Summary of partition changes
The Installation Summary screen will reappear.  I do not plan on doing any kernel dump analysis on a desktop box, so I disable kdump.  Click on the KDUMP text to advance to the KDUMP screen.  Click the Enable kdump check box to clear the box (Figure 10) and click the Done button.

Figure 10: Disable kdump.
The last item to configure before the installation begins is to enable the network interface.  Click the Network & Host Name text to display the configuration screen (Figure 11).  In the slider next to the network interface, click the slider from Off to On, then click the Done button.

Figure 11: Network & Host Name configuration.
 In the Installation Summary screen, click the Begin Installation button to begin the installation of CentOS 7.  The installation will begin and the resulting screen (Figure 12) displays the progress.  In this screen set the root password and create an initial user account and password.

Figure 12: Installation progress.
During the installation the Finish Configuration button will appear, click it to complete the install.  Then the Reboot button appears, click it to reboot into the command line installation of CentOS 7.

Figure 13: Installation Complete
After the system reboots, login using the root account username and the password created.  The following commands are run from the command line as the root user.

Enable the EPEL (Extra Packages for Enterprise Linux) repository, which contain the MATE Desktop:

# yum install epel-release
Check for updates:

# yum check-update

Install updates:

# yum update

Install the X Windows system:

# yum -y groupinstall "X Window system"

Install the MATE Dekstop:

# yum -y groupinstall "MATE Desktop"

At this point all of the software required for CentOS 7 and the MATE Desktop is complete.  Since this example is running in a VirtualBox virtual machine, prerequisite software for the VirtualBox additions should be installed.

# yum install dkms
To enable the graphical desktop at boot, the following command is run.  Since CentOS 7 is now running systemd instead of the sysvinit, we do not edit the inittab file.

#  systemctl set-default

Reboot the system to your MATE Desktop.

# reboot
Figure 14: CentOS with the MATE Desktop
 To login as root, click the username drop down box and select Other (Figure 15), then enter the root user name and password, then click the Log In button.

Figure 15: Log in a root.

From the VirtualBox menu select Devices, then Insert Guest Additions CD image to mound the virtual CDROM.  Open a command line and run the installation.  Note, you should replace the version text with the guest additions version installed.

# /run/media/root/VBOXADDITIONS_version/
After the installation completes, reboot the system again to boot into CentOS with the Guest Additions.  Log in with the initial user username and password.

Figure 16: A running CentOS 7 with Mate Desktop.

No comments: