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.

2 Comments

  1. Chris

    Thanks! Very useful post. I was able to add the gnome and get the GUI for the Hortonworks Sandbox 2.3. Now I see a bunch of accounts – HBase, Admin, Flume, Ambari-qa etc – how can i log in? The admin account doesn’t let me log in with admin or hadoop or root etc passwords. Where can i see the passwords?

    Reply
  2. 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

Leave a Comment

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>