Installing R in Hadoop Cluster

There are multiple ways to install R & R studio in your unix system here I have described the simplest of them all by which I have been able to install R successfully in my system.

Installing R :-
Step1:- Download the latest R package from Cran.

Step2:- Choose a directory to install the R tree (R is not just a binary, but has additional data sets, help files, font metrics etc). Let us call this place R_HOME. Untar the source code. This should create directories src, doc, and several more under a top-level directory: change to that top-level directory.
Issue the following commands:
./configure
make

Step3:- Then check the built system works correctly by
make check
or
make check-devel
or
make check-all
 
Step4:- Then type
make install
This will install to the following directories:
prefix/bin or bindir
the front-end shell script and other scripts and executables
prefix/man/man1 or mandir/man1
the man page
prefix/LIBnn/R or libdir/R
all the rest (libraries, on-line help system, …). Here LIBnn is usually ‘lib’, but may be ‘lib64’ on some 64-bit Linux systems. This is known as the R home directory.
where prefix is determined during configuration (typically /usr/local) and can be set by running configure with the option --prefix, as in
./configure --prefix=/where/you/want/R/to/go
This causes make install to install the R script to /where/you/want/R/to/go/bin, and so on. The prefix of the installation directories can be seen in the status message that is displayed at the end of configure. The installation may need to be done by the owner of prefix, often a root account.
You can install into another directory tree by using
make prefix=/path/to/here install
 
Well that's it. This will complete the installation of R and now you can type R on your command prompt to get into R.

Installing R Studio[Cent OS] :-

32bit

$ sudo yum install openssl098e # Required only for RedHat/CentOS 6 and 7
$ wget http://download2.rstudio.org/rstudio-server-0.98.1091-i686.rpm
$ sudo yum install --nogpgcheck rstudio-server-0.98.1091-i686.rpm
64bit

$ sudo yum install openssl098e # Required only for RedHat/CentOS 6 and 7
$ wget http://download2.rstudio.org/rstudio-server-0.98.1091-x86_64.rpm
$ sudo yum install --nogpgcheck rstudio-server-0.98.1091-x86_64.rpm


Installing R Hadoop Packages :-

To install required packages for R Hadoop please follow the link here.

No comments:

Post a Comment