Configuring External libraries for R-Studio for CentOS 7

RStudio can be configured by adding entries to 2 configuration files. It may not exist by default and you may need to create

/etc/rstudio/rserver.conf
/etc/rstudio/rsession.conf

If you need to add additional libraries to the default LD_LIBRARY_PATH for R sessions. You have to add the parameters to the /etc/rstudio/rserver.conf

Step 1: Enter External Libraries settings
For example, you may want to add GCC-6.5 libraries

# Server Configuration File
rsession-ld-library-path=/usr/local/gcc-6.5.0/lib64:/usr/local/gcc-6.5.0/lib

Step 2a: Stop the R Server Services

# /usr/sbin/rstudio-server stop

Step 2b: Verify the Installation

# rstudio-server verify-installation

Step 2c: Start the R Server Services

# /usr/sbin/rstudio-server start
# /usr/sbin/rstudio-server status

(Make sure there is no error)

References:

  1. RStudio Server: Configuring the Server

 

Installing R-Studio on CentOS-7

Prerequisites

  • R-Studio (rstudio-server-rhel-1.3.1093-x86_64.rpm)
  • R-3.6.3
  • GNU-6.5
  • m4-1.4.18
  • gmp-6.1.0
  • mpfr-3.1.4
  • mpc-1.0.3
  • isl-0.18
  • gsl-2.1

Step 1: Download R-Studio v1.3.1093

On your terminal, Download the free version RStudio Server v1.3.1093 from RStudio.com

Step 2: Install R-Studio v1.3.1093

Follow the Install Process as written in https://rstudio.com/products/rstudio/download-server/redhat-centos/

% wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.3.1093-x86_64.rpm
% yum install rstudio-server-rhel-1.3.1093-x86_64.rpm

Step 3: Verify Installation

% /usr/sbin/rstudio-server verify-installation

Step 4: Make sure the R is compiled and placed correctly

  • Make sure the R –enable-R-shlib flags
  • RStudio will search for your installation of R in the traditional locations, such as RStudio will search for your installation of R in the traditional locations, such as
    /usr/bin/R
    /usr/local/bin/R

    If R is not installed in these locations, RStudio may not be able to find it.

Step 5: Fixing Login Issues

If you managed to launch the R-Studio,

 

But not able to or having error. Do take a look at PAM authentication in RStudio Connect

Simply copy /etc/pam.d/login and replace the /etc/pam.d/rstudio

% cp /etc/pam.d/login /etc/pam.d/rstudio

 

Useful References:

  1. RStudio Server Will Not Start
  2. PAM authentication in RStudio Connect