Community Articles

Find and share helpful community-sourced technical articles.
Celebrating as our community reaches 100,000 members! Thank you!


Hortonworks tutorials are a great resource and one I use often to explore new topics or re-enforce my current knowledge. Recently, I went through the Predicting Airline Delays using SparkR tutorial. This tutorial is using SparkR and RStudio, running on the HDP Sandbox.

For those, like me, who want to run rstudio on an HDP node running on something else than the sandbox, the configuration of rstudio differs a little from the article linked in this tutorial, which is why I thought of writing this quick article.

This tutorial will thus detail the installation and unit testing of RStudio Server for the following environment versions:

  • Hortonworks Data Platform: HDP 2.6
  • OS: Centos 7 64bit
  • Cloud Infrastucture: OpenStack

Installing rstudio-server on Centos 7

1. Connect to the server onto which you want to install rstudio-server:

$ ssh [your_user]@[your_server]

Note: the user with which you connect must have sudo priviledges.

2. Install R:

$ sudo yum install R -y

3. Once connected, following the RStudio official site, download the latest version of RStudio:

$ wget
$ sudo yum install rstudio-server-rhel-1.1.453-x86_64.rpm

4. Run & Verify service:

$ sudo systemctl enable rstudio-server.service
$ sudo systemctl start rstudio-server.service
$ sudo systemctl status rstudio-server.service

You should see something like this:

$ sudo systemctl status rstudio-server.service
● rstudio-server.service - RStudio Server
   Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-07-16 12:31:29 UTC; 22s ago
 Main PID: 13043 (rserver)
   CGroup: /system.slice/rstudio-server.service
           └─13043 /usr/lib/rstudio-server/bin/rserver

Jul 16 12:31:29 pvidal-hdp26-9244-compute-2 systemd[1]: Starting RStudio Server...
Jul 16 12:31:29 pvidal-hdp26-9244-compute-2 systemd[1]: Started RStudio Server.

5. Check that you can access the server inside of the network:

$ wget [your_server]:8787

You should see something like this:

$ wget
--2018-07-16 12:34:28--
Connecting to connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: [following]
--2018-07-16 12:34:28--
Connecting to connected.
HTTP request sent, awaiting response... 200 OK
Length: 894 [text/html]
Saving to: ‘index.html’

100%[===============================================================================================================================================================================>] 894         --.-K/s   in 0s      

2018-07-16 12:34:28 (99.4 MB/s) - ‘index.html’ saved [894/894]

Opening rstudio-server port on OpenStack

1. In your OpenStack dashboard, note your stack parameters (found in the overview tab of your stack):


2. Copy your current template to a text file (found in the template tab of your Stack):


Note: Make sure that the copy paste from the site did not add text before the "description" parameter.

3. Add the following line to allow TCP connections to 8787 to your security group:

      - {port_range_max: 8787, port_range_min: 8787, protocol: tcp, remote_ip_prefix:}

4. Change your template using the OpenStack dashboard:

Click on Change Stack Template:


Browse to the file you just modified and click Next:


Copy paste the parameters you noted previously:


Verify access to RStudio

1. Open your browser and go to the following address:


You should see the following screen:


2. Use any unix user/password to connect.