RHadoop Installation on Ubuntu 4

In this post, we will briefly discuss about the steps for RHadoop Installation on Ubuntu 14.04 Machine with Hadoop-2.6.0 version. We also see the procedure for R & RStudio Installations on Ubuntu Machine. All these installations are done on single node hadoop machine.

RStudio Installation on Hadoop Machine

Before proceeding with steps detailed below, Hadoop machine setup should be completed. Please refer install-hadoop-on-single-node-cluster in this blog, for Hadoop installation

Install latest R version

Ubuntu Linux machine contains repositories which may not install the latest R version which 3.0.1. In order to deal with that, we need to add the R CRAN repository to the sources list. Below are the relevant commands which are needed to install latest R version.

Once the list file is opened, copy and paste the below line at the end of the file (choose link based on the linux version on the system)

Ubuntu LTS 14.10

deb http:///bin/linux/ubuntu utopic/

Ubuntu LTS 12.04

deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu precise/

Ubuntu LTS 14.04

deb http:///bin/linux/ubuntu trusty/

Ubuntu LTS 14.10

deb http:///bin/linux/ubuntu lucid/

After closing the file, you need to run the below commands to authenticate the newly added source.

To install the latest R version, execute. R base is mandatory for installing RStudio.

Validate installation of R by entering R command in the terminal

Verify R Installation

Install R-Studio

To download and install RStudio Server open a terminal window and execute the commands listed below. Note that the gdebi-core package is installed first so that gdebi can be used to install RStudio and all of its dependencies. Also note that the libapparmor1 dependency is required for Ubuntu.

for 32-bit version OS, type below

for 64-bit version OS, type below

Run the below script to check whether Rstudio server installation was successful.

Now rstudio can be accessed using a web interface. The address would be a combination of ip address and a default port number (8787).

URL: http://<IP-Address>:8787/ (here,

Username: <<System Username>>

Password: <<System Password>>

RStudio Web UI 1RStudio Web UI 2

Run below commands in RStudio

Download Required R Packages and Install

Download rmr, rhdfs, plyrmr, rhbase from here
Go to Tools -> Install packages ->  package Archive File, then browse and select to install downloaded packages

Packages Installation In RStudio

Run below example in RStudio to validate installation

RStudio Example Run

Profile photo of Siva

About Siva

Senior Hadoop developer with 4 years of experience in designing and architecture solutions for the Big Data domain and has been involved with several complex engagements. Technical strengths include Hadoop, YARN, Mapreduce, Hive, Sqoop, Flume, Pig, HBase, Phoenix, Oozie, Falcon, Kafka, Storm, Spark, MySQL and Java.

Leave a Reply to Himanshu Cancel reply

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

4 thoughts on “RHadoop Installation on Ubuntu

  • Himanshu

    Thanks Siva. The tutorial was very helpful to me.

    Interestingly, I was setting HADOOP_CMD to $HADOOP_HOME instead of $HADOOP_HOME/bin/hadoop .

  • lakshminadh

    Dear siva,

    Thank you siva. Great tutorial. It was very helpful to me.

    I follow the same instructions as you mentioned above for setting up RHadoop environment.

    But after running sample program as you mentioned I did not get any output.

    I got output as below

    Please kindly give me some pointers how to solve above issue.