Site icon R-bloggers

Installing RStudio Server on Ubuntu Server

[This article was first published on tuxette-chix » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This tutorial describes the different steps required to install RStudio Server on Ubuntu Server (version 14.04 LTS). It is widely inspired from the official installation instructions

Installing R

First, R must be installed on the server. The best way to do so is to proceed as described on this page, that is:

The best way to install packages is to use the up-to-date packages from RutteR PPA. Install the PPA using:

sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update

and packages can simply be installed using

sudo apt-get install r-cran-reshape2

for instance (for installing the excellent package reshape2. It is better to install the packages as an admin because they will be available for all users and not only the current user.

Installing RStudio Server

The free version of RStudio Server can be found at this link. The installation is performed by first installing two additional packages (the first one to ease the installation of deb packages and the second one to manage security options in RStudio Server:

sudo apt-get install gdebi-core libapparmor1

Then, the package is downloaded and installed using:

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

At this step, RStudio Server is maybe accessible at http://my-domain.org:8787. If not (and/or if you want to create a virtual host to access RStudio Server more easily), read the next section.

Last details to check

If you are using a firewall on your server, make sure that the port 8787 is open. In my case, it is managed with shorewall (see this post, in French) and the port can be open by editing the file /etc/shorewall/rules and adding the following line

ACCEPT          net             $FW             tcp     8787

before reloading the firewall configuration

sudo service shorewall restart

 

A virtual host can be set for accessing RStudio Server at an URL of the type http://rstudio.my-domain.org by

To leave a comment for the author, please follow the link and comment on their blog: tuxette-chix » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.