How to Add Gnome GUI to Hortonworks Sandbox

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:

http://www.idevelopment.info/data/Unix/Linux/LINUX_AddGNOMEToCentOSMinimalInstall.shtml

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:

id:5:initdefault

(there was the number 3 instead of 5).

Run

poweroff

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.

3 Comments

  1. Ihor Bobak (Post author)

    Chris, the password for root should be “hadoop”. I don’t see any reason for logging on under hdfs or hbase or any other service-login: I suggest to log on under root, create your own login, add it to sudoers and then to log on under your own login.

    Reply
  2. Mark

    I can’t hug you because this is the internet, but this is such a useful tutorial.

    I’ve got this up and running with Sandbox 2.4. You get one error with the VirtualBox extensions trying to install an OpenGL thing, but apart from that it worked great.

    There were no kernel modules marked for update in the latest version.

    Thanks again.

    Reply
  3. Vijay

    Thanks! Very helpful post. I am now able to have a GUI for HDP2.4 sandbox following your tutorial. Many Thanks

    Reply

Leave a Reply to Vijay Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>