C.2 Installing RStudio Server

RStudio Server is a Linux application that provides a web-based interface to R on a server.

To install RStudio Server for use with Oracle R Enterprise:

  1. Go to the RStudio website and navigate to the RStudio Server Download page. Download the server to your Linux system and follow the installation instructions.

  2. Edit the configuration file rserver.conf. Supply the values of RHOME and ORACLE_HOME.

    sudo vi /etc/rstudio/rserver.conf
        rsession-ld-library-path=RHOME/lib:ORACLE_HOME/lib
    

    Note: The default value of RHOME on Linux is /usr/lib64/R.

  3. Edit the configuration file .Renviron. Supply the values of ORACLE_HOME, ORACLE_HOSTNAME, and ORACLE_SID. For example, using the BASH shell:

    cd /home/oracle
    sudo vi .Renviron
        ORACLE_HOME=ORACLE_HOME
        ORACLE_HOSTNAME=ORACLE_HOSTNAME
        ORACLE_SID=ORACLE_SID
     
    export ORACLE_HOME
    export ORACLE_HOSTNAME
    export ORACLE_SID
    
  4. Refer to the instructions for configuring the server. Return to the RStudio Server Download page, then navigate to the Configuring the Server article in the RStudio documentation.

  5. To access the Oracle R Distribution 3.3.0 help within RStudio, modify as sudo or root the file /usr/lib/rstudio-server/R/modules/SessionHelp.R.

    Update httpdPortIsFunction to the following:

    .rs.addFunction( "httpdPortIsFunction", function() {
       getRversion() >= "3.3"
    })