R, RStudio server and Bioconductor

Add to /etc/apt/sources.list this line:

deb http://cran.mirror.garr.it/mirrors/CRAN/bin/linux/ubuntu precise/

then

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install r-base

Enter R at prompt:

R version 3.0.1 (2013-05-16) -- "Good Sport"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)


Download and install

apt-get install gdebi-core
apt-get install libapparmor1

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

Configure reverse-proxy

apt-get install libapache2-mod-proxy-html
apt-get install libxml2-dev
a2enmod proxy
a2enmod proxy_http
nano -w /etc/apache2/sites-enabled/000-default
  <Proxy *>
    Allow from localhost
  </Proxy>

  ProxyPass        /rstudio/ http://localhost:8787/
  ProxyPassReverse /rstudio/ http://localhost:8787/
  RedirectMatch permanent ^/rstudio$ /rstudio/
service apache2 restart

Limit connection from localhost

nano -w /etc/rstudio/rserver.conf
  www-address=127.0.0.1
rstudio-server stop
rstudio-server start


Additional packages required

apt-get install libcurl4-openssl-dev

Login as root and at R prompt:

source("http://bioconductor.org/biocLite.R")
biocLite()
biocLite(c("GenomicFeatures", "AnnotationDbi"))