In this article we will show how to install GUI on Hortonworks Sandbox in VirtualBox.
Everything that is shown here was done on HDP 2.1 Sandbox, but I personally checked that it works fine for HDP 2.2 and HDP 2.3 Sandboxes.
The result looks like this:
Everything that is described below was done under the root account with the latest version of the virtualbox.
The source of the information how to install Gnome to CentOS is here:
So, we will launch the following commands:
yum -y groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts" yum -y groupinstall "Graphical Administration Tools" yum -y groupinstall "Internet Browser" yum -y groupinstall "General Purpose Desktop" yum -y groupinstall "Office Suite and Productivity" yum -y groupinstall "Graphics Creation Tools"
For convenience I’ve made also
yum install mc
Open the file /etc/inittab in a text editor (F4 in Midnight Commander) and change this line:
(there was the number 3 instead of 5).
In the properties of the virtual machine
Change the following properties of the virtual machine:
Launch the vm.
Of course, it would be nice to install the virtualbox guest additions, but if you do this, with 99.9% you will get problems.
To fix them run
yum update kernel* reboot
After the reboot launch the virtualbox guest additions installation. You will get this:
It tries to compile the kernel modules, but it doesn’t work because there are no sources on the drive.
To fix the problem, type in google “kernel-devel-…” (that long word from the picture – copy paste it from the terminal window). You will be redirected to this site:
Download and install this package manually. As a result, you will get a folder on your disk in /usr/src/kernels/ containing the sources of the kernel.
Then we have to do steps following this manual http://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/ – but don’t run everything, do just these:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm yum install gcc kernel-devel kernel-headers dkms make bzip2 perl KERN_DIR=/usr/src/kernels/2.6.32-431.11-THE_FOLDER_WHICH_YOU_GOT-PRESS-TAB-IT-WILL_AUTOCOMPLETE export KERN_DIR cd /media/VBO...PRESS-TAB
there will be a script ./VBoxLinuxAdditions.run. Launch this script, and here you are:
The Hortonworks Sandbox 2.1 now has a GUI.