vikasgupta1812
12/5/2014 - 9:00 PM

How to install RRO, RStudio, Java 7, RWeka and Rstudio

How to install RRO, RStudio, Java 7, RWeka and Rstudio

#!/bin/bash

## key for apt-get update, see http://cran.r-project.org/bin/linux/ubuntu/README
echo 'deb http://cran.revolutionanalytics.com/bin/linux/ubuntu/ utopic/' >> /etc/apt/sources.list

## SECURE APT
## The Ubuntu archives on CRAN are signed with the key of "Michael Rutter
## <marutter@gmail.com>" with key ID E084DAB9.  To add the key to your
## system with one command use (thanks to Brett Presnell for the tip):

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
apt-get update 
apt-get upgrade --assume-yes
# Install r
# sudo apt-get install r-base
cd /tmp
wget http://mran.revolutionanalytics.com/install/RRO-8.0-Beta-Ubuntu-14.04.x86_64.tar.gz    
tar zxvf RRO-8.0-Beta-Ubuntu-14.04.x86_64.tar.gz
./install.sh
## RRO will be installed in '/usr/lib64/RRO-8.0' -- update your $PATH accordingly

mkdir /etc/R
touch /etc/R/Rprofile.site
echo 'options(repos = list(CRAN = "http://cran.revolutionanalytics.com/"))' >> /etc/R/Rprofile.site

echo 'R_LIBS_USER="/usr/lib64/RRO-8.0/R-3.1.1/lib/R/library"' >> /etc/R/Rprofile.site

#LaTeX, pandoc**
## LaTeX, pandoc etc. nightmare - just google rstudio errors and follow the trail . . .
## sudo apt-get install ec

apt-get install texlive-fonts-recommended --assume-yes
apt-get install texlive-latex-recommended --assume-yes

## RStudio server, run interactively
## See here for updates: http://www.rstudio.com/products/rstudio/download-server/
apt-get install gdebi-core --assume-yes
apt-get install libapparmor1 --assume-yes # Required only for Ubuntu, not Debian

wget http://download2.rstudio.org/rstudio-server-0.98.1085-amd64.deb
gdebi -n rstudio-server-0.98.1085-amd64.deb

## sure everything is working
rstudio-server verify-installation

wget http://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.3.0.387-amd64.deb
gdebi -n shiny-server-1.3.0.387-amd64.deb

apt-get install openjdk-7-* --assume-yes
apt-get install libmysqlclient-dev --assume-yes
R CMD javareconf

apt-get install libxml2-dev --assume-yes
R --slave -e 'install.packages(c("rJava"))'
R --slave -e 'install.packages(c("RWeka"))'

#Installers for shiny

apt-get install -y g++ --assume-yes
R --slave -e 'install.packages(c("shiny", "rmarkdown"))'



#**git**
apt-get --yes --force-yes install git

#**Which program is listening to what port.**


rstudio-server restart
restart shiny-server